https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95587
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Priority|P3 |P4
--- Comment #2 from anlauf at gcc dot gnu.org ---
The ICE is fixed by this patch:
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 82d2b5087e5..8063fcad295 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -5700,6 +5700,11 @@ gfc_match_equivalence (void)
if (!gfc_add_in_equivalence (&sym->attr, sym->name, NULL))
goto cleanup;
+ if (sym->ts.type == BT_CLASS
+ && CLASS_DATA (sym)
+ && !gfc_add_in_equivalence (&CLASS_DATA (sym)->attr,
+ sym->name, NULL))
+ goto cleanup;
if (sym->attr.in_common)
{
Haven't tested this thoroughly yet.