@@ -10,8 +10,41 @@ program test_event_post
1010 implicit none
1111
1212 ! event_type variables must be coarrays
13+ ! ERROR: Variable 'non_coarray' with EVENT_TYPE or LOCK_TYPE must be a coarray
1314 type (event_type) non_coarray
1415
16+ ! event_type potential object components must be nested in coarrays
17+ type :: has_event
18+ type (event_type) event
19+ end type
20+ type :: bad1
21+ type (has_event) component
22+ end type
23+ type :: bad2
24+ type (has_event), allocatable :: component
25+ end type
26+ type :: good1
27+ type (has_event), pointer :: component
28+ end type
29+ type :: good2
30+ type (has_event), allocatable :: component[:]
31+ end type
32+ ! ERROR: Variable 'non_coarray_component1' with EVENT_TYPE or LOCK_TYPE potential component '%event' must be a coarray
33+ type (has_event) non_coarray_component1
34+ ! ERROR: Variable 'non_coarray_component2' with EVENT_TYPE or LOCK_TYPE potential component '%component%event' must be a coarray
35+ type (bad1) non_coarray_component2
36+ ! ERROR: Variable 'non_coarray_component3' with EVENT_TYPE or LOCK_TYPE potential component '%component%event' must be a coarray
37+ type (bad2) non_coarray_component3
38+ ! these are okay
39+ type (has_event) ok_non_coarray_component1[* ]
40+ type (has_event), pointer :: ok_non_coarray_component2
41+ type (bad1) :: ok_non_coarray_component3[* ]
42+ type (bad1), pointer :: ok_non_coarray_component4
43+ type (bad2) :: ok_non_coarray_component5[* ]
44+ type (bad2), pointer :: ok_non_coarray_component6
45+ type (good1) ok_non_coarray_component7
46+ type (good2) ok_non_coarray_component8
47+
1548 type (event_type) concert[* ], occurrences(2 )[* ]
1649 integer non_event[* ], sync_status, co_indexed_integer[* ], superfluous_stat, non_scalar(1 )
1750 character (len= 128 ) error_message, co_indexed_character[* ], superfluous_errmsg
@@ -25,10 +58,6 @@ program test_event_post
2558 ! ERROR: The event-variable must be of type EVENT_TYPE from module ISO_FORTRAN_ENV
2659 event post(non_event)
2760
28- ! event-variable must be a coarray
29- ! ERROR: The event-variable must be a coarray
30- event post(non_coarray)
31-
3261 ! ERROR: Must be a scalar value, but is a rank-1 array
3362 event post(occurrences)
3463
0 commit comments