summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_event_2.f08
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/coarray_event_2.f08')
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_event_2.f0813
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray_event_2.f08 b/gcc/testsuite/gfortran.dg/coarray_event_2.f08
new file mode 100644
index 00000000000..20a37f332fb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_event_2.f08
@@ -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