[Bug fortran/96102] ICE in check_host_association, at fortran/resolve.c:5994
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 7 21:51:51 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96102
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
Priority|P3 |P4
Last reconfirmed| |2020-07-07
Status|UNCONFIRMED |NEW
--- Comment #2 from kargl at gcc dot gnu.org ---
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 280157)
+++ gcc/fortran/resolve.c (working copy)
@@ -5899,6 +5899,15 @@ check_host_association (gfc_expr *e)
&& sym->attr.flavor == FL_PROCEDURE
&& sym->attr.contained)
{
+
+ if (old_sym->attr.flavor == FL_VARIABLE
+ && sym->attr.proc == PROC_INTERNAL)
+ {
+ gfc_error ("Internal procedure %qs at %L has already been "
+ "used as a variable", sym->name, &sym->declared_at);
+ return false;
+ }
+
/* Clear the shape, since it might not be valid. */
gfc_free_shape (&e->shape, e->rank);
More information about the Gcc-bugs
mailing list