[Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 17 19:22:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org 2012-10-17 19:22:34 UTC ---
(In reply to comment #1)
> The ICE starts with 4.6.3. The ICE occurs at
> 
>   gcc_assert (result->symtree
>               && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
>                   || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));
> 
> introduced by r183314

... which was Tobias' fix for PR 51904. I think the most straightforward thing
would be to just remove the assert again:


Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c    (revision 192392)
+++ gcc/fortran/expr.c    (working copy)
@@ -4606,9 +4606,6 @@ gfc_build_intrinsic_call (const char* name, locus
   result->value.function.isym = isym;

   result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
-  gcc_assert (result->symtree
-          && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE
-          || result->symtree->n.sym->attr.flavor == FL_UNKNOWN));

   va_start (ap, numarg);
   atail = NULL;


In a valid-code context the assert surely makes sense, but here it seems to
choke on the fallout of the two errors.



More information about the Gcc-bugs mailing list