@@ -14525,7 +14525,7 @@ resolve_symbol (gfc_symbol *sym)
&& !sym->attr.codimension && !sym->ts.u.derived->attr.coarray_comp)
{
gfc_error ("Variable %s at %L of type EVENT_TYPE or with subcomponent of "
- "type LOCK_TYPE must be a coarray", sym->name,
+ "type EVENT_TYPE must be a coarray", sym->name,
&sym->declared_at);
return;
}
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+
+! Check that pr79866 is really fixed.
+
+ use iso_fortran_env
+ type(event_type) :: x ! { dg-error "of type EVENT_TYPE or with subcomponent of type EVENT_TYPE must be a coarray" }
+
+contains
+ subroutine exchange
+ event post (x[1]) ! { dg-error "Syntax error in EVENT POST statement at .1." }
+ end subroutine
+end