[Patch, fortran] PR35997 - [4.3/4.4 regression]Used function interface bug

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Apr 29 14:20:00 GMT 2008


:ADDPATCH fortran:

This is yet another regression that I have caused - hopefully they are
drying up:)

The problem arises because the present version of module.c does not
add a new symtree that is not renamed if the symbol is already
present.  The test in module.c(find_symbol) was failing to resolve the
case where the renaming is already done in the module that is being
use associated.  This patch accomplishes this by looking for a symtree
with the same name as the symbol and, upon failure, checking that the
symbol is not
renamed; this can only correspond to the unresolved case.

Notice that the reporter focussed on interface functions - this bug
applies to ANY symbol that is renamed in another module and available
by use association from that module.  Accordingly the test case has,
in addition to the function of the reporter's testcase, a variable.
This is a trivial extension but it is as well to establish the
principle.

This has been regtested on Cygwin_NT/amd64 - I'll do a full bootstrap
and regtest when I get home - OK for trunk and 4.3?

Paul

2008-04-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35997
	* module.c (find_symbol): Do not return a result for a symbol
	that has been renamed in another module.

2008-04-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35997
	* gfortran.dg/use_rename_3.f90
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: text/x-patch
Size: 3419 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080429/171f183a/attachment.bin>


More information about the Fortran mailing list