[Patch, fortran] PR20880 - Failure to detect procedures encompassing own interface
Paul Thomas
paulthomas2@wanadoo.fr
Tue Nov 21 08:53:00 GMT 2006
:ADDPATCH fortran:
This PR is asssociated with the failure of gfortran to recognise
interfaces that have the same name as their enclosing scope; either
directly or by use association. The former causes an ICE at present,
whilst the latter is quietly accepted.
The patch and the testcase are straightforward: USE associated
procedures are already marked as ambiguous in module.c; Directly
enclosed interfaces are checked in gfc_add_explicit_interface. Note
that SUCCESS is returned here to prevent the plethora of secondary
errors. The preceeding error is not amenable to this, as it promptly
gets over-ridden by errors concerning type and kind confusion.
Regtested on suse10.1/amd64 - OK for trunk, 4.2 and 4.1?
Paul
2006-11-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20880
* symbol.c (gfc_add_explicit_interface): Error if procedure is that
of encompassing scope.
* resolve.c (resolve_fl_procedure): Error if procedure is ambiguous.
2006-11-21 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/20061121/1ed88284/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061121/1ed88284/attachment-0001.ksh>
More information about the Gcc-patches
mailing list