This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran] PR fortran/35820 memory leak while compiling nested forall constructs.


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

Attachment: pr35820.changes
Description: Text document

Attachment: pr35820.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]