[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 Jerry DeLisle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Jerry DeLisle --- Closing as fixed on trunk
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 --- Comment #5 from Jerry DeLisle --- Author: jvdelisle Date: Sun Jan 24 22:18:20 2016 New Revision: 232780 URL: https://gcc.gnu.org/viewcvs?rev=232780&root=gcc&view=rev Log: 2016-01-23 Jerry DeLisle PR fortran/69397 PR fortran/68442 * interface.c (gfc_arglist_matches_symbol): Replace assert with a return false if not a procedure. * resolve.c (resolve_generic_f): Test if we are resolving an initialization expression and adjust error message accordingly. 2016-01-24 Jerry DeLisle PR fortran/69397 PR fortran/68442 * gfortran.dg/interface_38.f90: New test. * gfortran.dg/interface_39.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/interface_38.f90 trunk/gcc/testsuite/gfortran.dg/interface_39.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/interface.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 Jerry DeLisle changed: What|Removed |Added Status|WAITING |ASSIGNED
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 --- Comment #4 from Jerry DeLisle --- See patch attached to PR68442, attachment 37430
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 --- Comment #3 from Jerry DeLisle --- (In reply to Dominique d'Humieres from comment #2) > Related to/duplicate of pr68442. Sort of related, but I find 68442 fixed already. > - gcc_assert (sym->attr.flavor == FL_PROCEDURE); > + /* gcc_assert (sym->attr.flavor == FL_PROCEDURE); */ > + if (sym->attr.flavor != FL_PROCEDURE) > +return false; > How is this for error messages (I tweaked the second one): $ gfc pr69397.f90 pr69397.f90:3:18: procedure f1 1 Error: Procedure âf1â in generic interface 'f' at (1) is neither function nor subroutine pr69397.f90:7:11: print *, f(z) 1 Error: Generic procedure âfâ at (1) must have a specific procedure defined
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2016-01-20 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres --- 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.0 +0100 +++ gcc/fortran/interface.c 2016-01-15 22:14:17.0 +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)
[Bug fortran/69397] ICE on missing subprogram in generic interface
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69397 Jerry DeLisle changed: What|Removed |Added CC||jvdelisle at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org --- Comment #1 from Jerry DeLisle --- 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.