[Patch, Fortran] PR 58998: [4.8/4.9 Regression] Generic interface problem with gfortran

Janus Weil janus@gcc.gnu.org
Mon Dec 30 17:03:00 GMT 2013


Hi all,

since the number of regressions unfortunately keeps on rising since
quite some time, I think it would be a suitable new-year's resolution
for the whole gfortran team to try and get the number of those buggers
closer to zero again ;)

I even volunteer to make a start with the one mentioned in the subject
line. The fix is actually easy once you know where to look (which was
simplified a lot by Dominique's efforts to identify the blameworthy
commit).

The rather straightforward one-line patch was regtested on
x86_64-unknown-linux-gnu. Ok for trunk and 4.8?

Cheers,
Janus



2013-12-30  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58998
    * resolve.c (resolve_symbol): Check that symbol is not only flavorless
    but also untyped.

2013-12-30  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58998
    * gfortran.dg/generic_28.f90: New.
-------------- next part --------------
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 206231)
+++ gcc/fortran/resolve.c	(working copy)
@@ -12732,7 +12732,8 @@ resolve_symbol (gfc_symbol *sym)
   if (sym->attr.flavor == FL_UNKNOWN
       || (sym->attr.flavor == FL_PROCEDURE && !sym->attr.intrinsic
 	  && !sym->attr.generic && !sym->attr.external
-	  && sym->attr.if_source == IFSRC_UNKNOWN))
+	  && sym->attr.if_source == IFSRC_UNKNOWN
+	  && sym->ts.type == BT_UNKNOWN))
     {
 
     /* If we find that a flavorless symbol is an interface in one of the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generic_28.f90
Type: text/x-fortran
Size: 296 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20131230/cb5ef3e7/attachment.bin>


More information about the Fortran mailing list