"statement at %L with different type objects";
if ((object ==2
&& last_eq_type == SEQ_MIXED
+ && last_where
&& !gfc_notify_std (GFC_STD_GNU, msg, first_sym->name, last_where))
|| (eq_type == SEQ_MIXED
&& !gfc_notify_std (GFC_STD_GNU, msg, sym->name, &e->where)))
"statement at %L with objects of different type";
if ((object ==2
&& last_eq_type == SEQ_NONDEFAULT
+ && last_where
&& !gfc_notify_std (GFC_STD_GNU, msg, first_sym->name, last_where))
|| (eq_type == SEQ_NONDEFAULT
&& !gfc_notify_std (GFC_STD_GNU, msg, sym->name, &e->where)))
--- /dev/null
+! { dg-do compile }
+! { dg-options "-std=f95" }
+! PR fortran/107559 - ICE in resolve_equivalence
+! Contributed by G.Steinmetz
+
+module m
+ implicit none
+ integer, protected :: a ! { dg-error "Fortran 2003: PROTECTED attribute" }
+ integer :: b
+ equivalence (a, b) ! { dg-error "has no IMPLICIT type" }
+end