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 44430: [4.5/4.6 Regression] Infinite recursion with -fdump-parse-tree


Hi all,

here is the fix for a regression introduced by one of my procedure
pointer patches last year (r149586). One of the things this patch did
was to give a formal_ns to all procedures (before that, the formal_ns
field was only used for interfaces, I think). Now this creates a
problem for -fdump-parse-tree if the formal_ns coincides with the
local namespace of the procedure (which is usually the case for normal
functions and subroutines): Dumping the procedure symbol includes
dumping the formal_ns, which again contains the procedure symbol, so
that we end up in an infinite loop. My fix avoids this by checking if
the formal_ns is the same as the procedure ns.

The patch was regtested on x86_64-unknown-linux-gnu without failures.
Ok for trunk and 4.5?

Also: Should I include a test case when committing this patch? And if
yes, what should it look like? I haven't found any test cases for
-fdump-parse-tree in the test suite ...

Cheers,
Janus


2010-06-06  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44430
	* dump-parse-tree.c (show_symbol): Avoid infinite loop.

Attachment: pr44430.diff
Description: Binary data


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