This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/69397] ICE on missing subprogram in generic interface


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2016-01-20
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Related to/duplicate of pr68442.

> We have a gcc_assert in there so we should probably turn it into an error
> or bail out instead of give an ICE.
>
> I will take it.

I have the following patch in my working tree:

--- ../_clean/gcc/fortran/interface.c   2016-01-04 19:51:09.000000000 +0100
+++ gcc/fortran/interface.c     2016-01-15 22:14:17.000000000 +0100
@@ -3506,7 +3506,9 @@ gfc_arglist_matches_symbol (gfc_actual_a
   gfc_formal_arglist *dummy_args;
   bool r;

-  gcc_assert (sym->attr.flavor == FL_PROCEDURE);
+  /* gcc_assert (sym->attr.flavor == FL_PROCEDURE); */
+  if (sym->attr.flavor != FL_PROCEDURE)
+    return false;

   dummy_args = gfc_sym_get_dummy_args (sym);

With it the iCE is replaced with the error

pr69397.f90:7:11:

    print *, f(z)
           1

Error: There is no specific function for the generic 'f' at (1)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]