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=gcc&view=rev&rev=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.

Reply via email to