diff options
author | Janus Weil <janus@gcc.gnu.org> | 2015-01-23 09:32:09 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2015-01-23 09:32:09 +0100 |
commit | 652960d1809b326ad20adcaac1b5a72796413a2e (patch) | |
tree | a58fb8c9c7bd215016e24d0af8cfbd2a3c342ff0 /gcc/fortran | |
parent | c146acedf5139830c2a4b10e1bedbb2addd53dff (diff) | |
download | gcc-652960d1809b326ad20adcaac1b5a72796413a2e.zip gcc-652960d1809b326ad20adcaac1b5a72796413a2e.tar.gz gcc-652960d1809b326ad20adcaac1b5a72796413a2e.tar.bz2 |
re PR fortran/60922 (Memory leak with allocatable CLASS components)
2015-01-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/60922
* class.c (finalize_component): Apply the check for 'fini_coarray' only
to coarray components.
2015-01-23 Janus Weil <janus@gcc.gnu.org>
PR fortran/60922
* gfortran.dg/class_allocate_17.f90: New.
From-SVN: r220029
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/class.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 51d7b59..0695b22 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-01-23 Janus Weil <janus@gcc.gnu.org> + + PR fortran/60922 + * class.c (finalize_component): Apply the check for 'fini_coarray' only + to coarray components. + 2015-01-23 Tobias Burnus <burnus@net-b.de> PR fortran/64726 diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index a9b65e6..55e7ef4 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -928,7 +928,7 @@ finalize_component (gfc_expr *expr, gfc_symbol *derived, gfc_component *comp, /* Add IF (fini_coarray). */ if (comp->attr.codimension || (comp->ts.type == BT_CLASS && CLASS_DATA (comp) - && CLASS_DATA (comp)->attr.allocatable)) + && CLASS_DATA (comp)->attr.codimension)) { block = gfc_get_code (EXEC_IF); if (*code) |