[Bug fortran/69397] ICE on missing subprogram in generic interface
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Wed Jan 20 21:47:00 GMT 2016
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)
More information about the Gcc-bugs
mailing list