@@ -21,16 +21,16 @@ program test_event_wait
2121
2222 ! _________________________ invalid event-variable ________________________________
2323
24- ! event-variable must be event_type
24+ ! ERROR: The event-variable must be of type EVENT_TYPE from module ISO_FORTRAN_ENV
2525 event wait(non_event)
2626
27- ! event-variable must be a coarray
27+ ! ERROR: The event-variable must be a coarray
2828 event wait(non_coarray)
2929
30- ! event-variable must not be coindexed
30+ ! ERROR: A event-variable in a EVENT WAIT statement may not be a coindexed object
3131 event wait(concert[1 ])
3232
33- ! event-variable must not be coindexed
33+ ! ERROR: A event-variable in a EVENT WAIT statement may not be a coindexed object
3434 event wait(occurrences(1 )[1 ])
3535
3636 ! ERROR: Must be a scalar value, but is a rank-1 array
@@ -62,21 +62,62 @@ program test_event_wait
6262
6363 ! ______ invalid event-wait-spec-lists: redundant event-wait-spec-list ____________
6464
65- ! No specifier shall appear more than once in a given event-wait-spec-list
65+ ! ERROR: Until-spec in a event-wait-spec-list may not be repeated
6666 event wait(concert, until_count= threshold, until_count= indexed(1 ))
6767
68- ! No specifier shall appear more than once in a given event-wait-spec-list
68+ ! ERROR: Until-spec in a event-wait-spec-list may not be repeated
69+ event wait(concert, until_count= threshold, stat= sync_status, until_count= indexed(1 ))
70+
71+ ! ERROR: Until-spec in a event-wait-spec-list may not be repeated
72+ event wait(concert, until_count= threshold, errmsg= error_message, until_count= indexed(1 ))
73+
74+ ! ERROR: Until-spec in a event-wait-spec-list may not be repeated
75+ event wait(concert, until_count= threshold, stat= sync_status, errmsg= error_message, until_count= indexed(1 ))
76+
77+ ! ERROR: A stat-variable in a event-wait-spec-list may not be repeated
6978 event wait(concert, stat= sync_status, stat= superfluous_stat)
7079
71- ! No specifier shall appear more than once in a given event-wait-spec-list
80+ ! ERROR: A stat-variable in a event-wait-spec-list may not be repeated
81+ event wait(concert, stat= sync_status, until_count= threshold, stat= superfluous_stat)
82+
83+ ! ERROR: A stat-variable in a event-wait-spec-list may not be repeated
84+ event wait(concert, stat= sync_status, errmsg= error_message, stat= superfluous_stat)
85+
86+ ! ERROR: A stat-variable in a event-wait-spec-list may not be repeated
87+ event wait(concert, stat= sync_status, until_count= threshold, errmsg= error_message, stat= superfluous_stat)
88+
89+ ! ERROR: A errmsg-variable in a event-wait-spec-list may not be repeated
7290 event wait(concert, errmsg= error_message, errmsg= superfluous_errmsg)
7391
74- ! _____________ invalid sync-stat-lists: coindexed stat-variable __________________
92+ ! ERROR: A errmsg-variable in a event-wait-spec-list may not be repeated
93+ event wait(concert, errmsg= error_message, until_count= threshold, errmsg= superfluous_errmsg)
94+
95+ ! ERROR: A errmsg-variable in a event-wait-spec-list may not be repeated
96+ event wait(concert, errmsg= error_message, stat= superfluous_stat, errmsg= superfluous_errmsg)
7597
76- ! Check constraint C1173 from the Fortran 2018 standard
98+ ! ERROR: A errmsg-variable in a event-wait-spec-list may not be repeated
99+ event wait(concert, errmsg= error_message, until_count= threshold, stat= superfluous_stat, errmsg= superfluous_errmsg)
100+
101+ ! _____________ invalid sync-stat-lists: coindexed stat-variable - C1173 __________________
102+
103+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
77104 event wait(concert, stat= co_indexed_integer[1 ])
78105
79- ! Check constraint C1173 from the Fortran 2018 standard
106+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
80107 event wait(concert, errmsg= co_indexed_character[1 ])
81108
109+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
110+ event wait(concert, stat= co_indexed_integer[1 ], errmsg= error_message)
111+
112+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
113+ event wait(concert, stat= sync_status, errmsg= co_indexed_character[1 ])
114+
115+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
116+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
117+ event wait(concert, stat= co_indexed_integer[1 ], errmsg= co_indexed_character[1 ])
118+
119+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
120+ ! ERROR: The stat-variable or errmsg-variable in a event-wait-spec-list may not be a coindexed object
121+ event wait(concert, errmsg= co_indexed_character[1 ], stat= co_indexed_integer[1 ])
122+
82123end program test_event_wait
0 commit comments