diff mbox

[Fortran,committed] PR57762 - Fix memleak in gfortran.dg/class_array_7.f03

Message ID 51ED66D9.5010303@net-b.de
State New
Headers show

Commit Message

Tobias Burnus July 22, 2013, 5:07 p.m. UTC
That's a patch of the category: Make the testers happy (here: Dominque).

gfortran (in GCC 4.9) no longer frees allocatable at the end of the main 
program as they get implicitly the SAVE attribute (cf. Fortran 2008) - 
and that's now detectable due to finalizers.

Result: gfortran.dg/class_array_7.f03 now leaks memory, which clutters 
the valgrind output of the test suite. As the test itself is agnostic to 
a tailing deallocate, I added one.

Committed as Rev. 201137.

Tobias
diff mbox

Patch

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 201136)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@ 
+2013-07-22  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/57762
+	* gfortran.dg/class_array_7.f03: Fix memory leak.
+
 2013-07-22  Paolo Carlini  <paolo.carlini@oracle.com>
 
 	PR c++/52816
Index: gcc/testsuite/gfortran.dg/class_array_7.f03
===================================================================
--- gcc/testsuite/gfortran.dg/class_array_7.f03	(Revision 201136)
+++ gcc/testsuite/gfortran.dg/class_array_7.f03	(Arbeitskopie)
@@ -54,4 +54,5 @@  program main
   if (trim (print_type ("a", a)) .ne. "a is extended_type") call abort
   call reallocate (a)
   if (trim (print_type ("a", a)) .ne. "a is base_type") call abort
+  deallocate (a)
 end program main