This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41586] Allocatable _scalars_ are never auto-deallocated
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2009 19:21:34 -0000
- Subject: [Bug fortran/41586] Allocatable _scalars_ are never auto-deallocated
- References: <bug-41586-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from janus at gcc dot gnu dot org 2009-10-19 19:21 -------
Subject: Bug 41586
Author: janus
Date: Mon Oct 19 19:21:18 2009
New Revision: 152988
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152988
Log:
2009-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/41586
* parse.c (parse_derived): Correctly set 'alloc_comp' and
'pointer_comp'
for CLASS variables.
* trans-array.c (structure_alloc_comps): Handle deallocation and
nullification of allocatable scalar components.
* trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for
automatic deallocation.
(gfc_trans_deferred_vars): Automatically deallocate allocatable
scalars.
2009-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/41586
* gfortran.dg/auto_dealloc_1.f90: New test case.
Added:
trunk/gcc/testsuite/gfortran.dg/auto_dealloc_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41586