[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed:

   What|Removed |Added

Summary|[4.5/4.6/4.7/4.8|[4.5/4.6/4.7 Regression]
   |Regression] Memory leak |Memory leak with zero-sized
   |with zero-sized array   |array constructor
   |constructor |
  Known to fail|4.8.0   |

--- Comment #9 from Tobias Burnus burnus at gcc dot gnu.org 2012-05-31 
14:28:46 UTC ---
Author: burnus
Date: Thu May 31 14:28:41 2012
New Revision: 188062

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=188062
Log:
2012-05-31  Tobias Burnus  bur...@net-b.de

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans.c

--- Comment #10 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch 
2012-06-01 07:42:41 UTC ---
Thanks Tobias... this fixes the issue I saw for CP2K. From some further tests I
did, I couldn't see any negative side effects.

I had a look at other gcc branches, the patch applies flawlessly to 4.7 and 4.6
(I did not have a 4.5 branch around). I would be very happy to see it
integrated in 4.7.1 and 4.6.4, as it is nearly impossible to fully code around
this in CP2K. Array constructors are used much, and it is hard to guess which
ones could be zero-sized.


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #11 from Tobias Burnus burnus at gcc dot gnu.org 2012-06-01 
15:08:29 UTC ---
Author: burnus
Date: Fri Jun  1 15:08:24 2012
New Revision: 188111

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=188111
Log:
2012-06-01  Tobias Burnus  bur...@net-b.de

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_7-branch/gcc/fortran/ChangeLog
branches/gcc-4_7-branch/gcc/fortran/trans.c


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #12 from Tobias Burnus burnus at gcc dot gnu.org 2012-06-01 
20:06:45 UTC ---
Author: burnus
Date: Fri Jun  1 20:06:39 2012
New Revision: 188124

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=188124
Log:
2012-06-01  Tobias Burnus  bur...@net-b.de

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_6-branch/gcc/fortran/ChangeLog
branches/gcc-4_6-branch/gcc/fortran/trans.c


[Bug fortran/53521] [4.5/4.6/4.7 Regression] Memory leak with zero-sized array constructor

2012-06-01 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53521

--- Comment #13 from Tobias Burnus burnus at gcc dot gnu.org 2012-06-01 
20:40:45 UTC ---
Author: burnus
Date: Fri Jun  1 20:40:36 2012
New Revision: 188125

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=188125
Log:
2012-06-01  Tobias Burnus  bur...@net-b.de

PR fortran/53521
* trans.c (gfc_deallocate_scalar_with_status): Properly
handle the case size == 0.


Modified:
branches/gcc-4_5-branch/gcc/fortran/ChangeLog
branches/gcc-4_5-branch/gcc/fortran/trans.c