[Patch, fortran] PR38594 - [4.4 Regression] module function name mangled improperly if contained function of same name exists

Paul Richard Thomas paul.richard.thomas@gmail.com
Sat Jan 3 14:15:00 GMT 2009


Dear All,

Happy New Year to you all!

This is a fix for one of the rash of regressions that were reported
before Christmas - it's a pity, since we were down to two, but it does
show that folk out there are using gfortran:-)

The chunk of code in resolve_call that checks host association was
substituting the symbol for the correct procedure and popping it on to
the symtree.  This was OK for generic procedures, such as in
host_assoc_call_3.f90.  This latter was what triggered the
introduction of this bit of code.  I missed the fact that it failed
for specific references.  This patch fixes that by looking for the
symtree and substituting that in the call, except for generic
references.

Bootstrapped and regtested on FC9/x86_i64 - OK for trunk?

Cheers

Paul

2009-01-03  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35820
	* resolve.c (resolve_call): When searching for proper host
	association, use symtree rather than symbol.  For everything
	except generic subroutines, substitute the symtree in the call
	rather than the symbol.

2009-01-03  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35820
	* gfortran.dg/host_assoc_call_3.f90: Make sure that the generic
	interface still works, in addition to original tests.
	* gfortran.dg/host_assoc_call_6.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 2402 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090103/77ec05ec/attachment.bin>


More information about the Gcc-patches mailing list