[Patch, fortran] PR29652 -

Paul Thomas paulthomas2@wanadoo.fr
Wed Nov 15 18:26:00 GMT 2006


:ADDPATCH fortran:

This represents my second contribution in a struggle with the interface 
meta-bug PR29670.

This patch corrects a coding error in check_interface1, which compares 
two interface lists.  The arguments were used as the iterators for both 
and, as a result, the inner one was never reset.  Thus there would only 
be one passage through the inner list for the the first symbol in the 
outer.  The fix is, of course, to reset the inner iterator and to use a 
local pointer for it.  The testcase exercises the original PR, which is 
associated with a generic interface.   
gfortran.dg/defined_operatos_1.f90 had to be modified because one of the 
user-defined operator interfaces is now detected to be ambiguous; his 
seems like an economical test of this case.

Regtested on Cygwin_NT/amd64 - OK for trunk, 4.2 and 4.1?

Paul

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

    PR fortran/29652
    * interface.c (check_interface1): Use a local value, instead of the 
dummy, as
    the inner iterator over interface symbols.

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

    PR fortran/29652
    * gfortran.dg/generic_7.f90: New test.
    * gfortran.dg/defined_operators_1.f90: Add new error.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr29652.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061115/fb327862/attachment.ksh>


More information about the Gcc-patches mailing list