[Patch, fortran] PR20880 - Failure to detect procedures encompassing own interface

Paul Thomas paulthomas2@wanadoo.fr
Thu Nov 23 10:36:00 GMT 2006


I have shifted the error detection to (parse_interface)parse.c itself.  
This ensures that current_interface is always defined.  I have also 
applied the error to all interfaces, since generic and operator 
interfaces also cause an ICE if the contain procedures with the same 
name as the enclosing scope.  Even were it compiled correctly and not 
throw an error, linking would still be ambiguous.

Thanks to Erik and Tobias for picking up this fault in the patch and for 
helping me correct it.  Perhaps one of you can test it again, please?

Regtests on Cygwin_NT/amd64 - OK for trunk and 4.2?

Paul

2006-11-23 Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/20880
    * parse.c (parse_interface): Error if procedure name is that of
    encompassing scope.
    * resolve.c (resolve_fl_procedure): Error if procedure is
    ambiguous.

2006-11-23 Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/20880
    * gfortran.dg/interface_3.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr20880.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061123/1380af74/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061123/1380af74/attachment-0001.ksh>


More information about the Gcc-patches mailing list