1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check for errors in sync images statements
4 program test_sync_images
7 integer sync_status
, me
8 character(len
=128) error_message
10 !___ standard-conforming statement ___
12 sync
images(*, stat
=sync_status
, errmsg
=error_message
)
13 sync
images(*, stat
=sync_status
)
14 sync
images(*, errmsg
=error_message
)
17 sync
images(me
, stat
=sync_status
, errmsg
=error_message
)
18 sync
images(me
+1, stat
=sync_status
, errmsg
=error_message
)
19 sync
images(1, stat
=sync_status
, errmsg
=error_message
)
20 sync
images(1, stat
=sync_status
)
21 sync
images(1, errmsg
=error_message
)
24 sync
images([1], stat
=sync_status
, errmsg
=error_message
)
25 sync
images([1], stat
=sync_status
)
26 sync
images([1], errmsg
=error_message
)
29 !___ non-standard-conforming statement ___
34 !______ invalid sync-stat-lists: invalid stat= ____________
36 ! Invalid sync-stat-list keyword
38 sync
images(1, status
=sync_status
)
40 ! Invalid sync-stat-list: missing stat-variable
44 ! Invalid sync-stat-list: missing 'stat='
46 sync
images([1], sync_status
)
48 !______ invalid sync-stat-lists: invalid errmsg= ____________
50 ! Invalid errmsg-variable keyword
52 sync
images(*, errormsg
=error_message
)
54 ! Invalid sync-stat-list: missing 'errmsg='
56 sync
images([1], error_message
)
58 ! Invalid sync-stat-list: missing errmsg-variable
60 sync
images(*, errmsg
)
62 end program test_sync_images