[Patch, Fortran] PR fortran/35820 memory leak while compiling nested forall constructs.
Mikael Morin
mikael.morin@tele2.fr
Fri Oct 17 09:47:00 GMT 2008
Hi,
this patch uses the idea expressed by Tobias here
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35820#c4
gfortran was counting the number of forall iterators to allocate memory
but was taking nested forall into account only if they were in the first
statement of the parent forall body.
The patch adds a (recursive) function to count iterators.
It is tested with valgrind on both reduced and initial testcase.
The regression test passes on all but c_by_val_1.f and value_4.f90 (both
failing as well on trunk).
I would like some advices about the testcase as I don't know how to add
a valgrind check.
Mikael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr35820.changes
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081017/a1db10d3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr35820.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081017/a1db10d3/attachment-0001.ksh>
More information about the Fortran
mailing list