[Patch, fortran] PR20896 and PR25135 - last two interface patches

Paul Thomas paulthomas2@wanadoo.fr
Tue Dec 26 14:32:00 GMT 2006


:ADDPATCH fortran:

This double patch fixes the last two PRs in the interface meta-bug that 
are immediately amenable to repair; PR27318 will have to await global 
interface checking which I will be trying to develop in the coming months.

PR20896 results from ambiguity between nameless interfaces that 
themeselves contained within the specific procedures of a generic 
interface.  The fix consists of promoting the enclosed interface 
procedures to be global symbols, since they are neither contained or use 
associated and cannot be host associated; ie. the procedures themselves 
must be external to the scope being compiled.  Completing this fix was 
delayed for a little while by a redundant error in resolve.c, which 
turns out to have been an own goal :-)

PR25135 is a case of undetected ambiguity between a module procedure and 
a generic interface in another module.  Whilst a check is made, in 
reading generic interfaces, if a same name symbol exists, it is not 
marked as being ambiguous if it is.  Since generic interfaces can be 
accumulated from more than one module, the symtree is only marked as 
ambiguous if the symbol is not generic.

The new testcases are both those of the reporters.  In addition a couple 
of gfortran tests had to be modified; interface_7.f90 because a 
previously undetected name clash now produces an error and 
dummy_procedure_1.f90 because one of the calls was previously, 
incorrectly allowed, when it should be an error.

Regtested on Cygwin_NT/amd64 - OK for trunk and, in a week or so, for 4.2?

Paul


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061226/89ced4c3/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25135.diff
Type: text/x-patch
Size: 8077 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061226/89ced4c3/attachment.bin>


More information about the Gcc-patches mailing list