Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / synchronization02a.f90
blob27d30993be44216deb1aabbbe3afa81ae5484293
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check for errors in sync images statements
4 program test_sync_images
5 implicit none
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)
15 sync images(* )
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)
22 sync images(1 )
24 sync images([1], stat=sync_status, errmsg=error_message)
25 sync images([1], stat=sync_status )
26 sync images([1], errmsg=error_message)
27 sync images([1] )
29 !___ non-standard-conforming statement ___
31 !ERROR: expected '('
32 sync images
34 !______ invalid sync-stat-lists: invalid stat= ____________
36 ! Invalid sync-stat-list keyword
37 !ERROR: expected ')'
38 sync images(1, status=sync_status)
40 ! Invalid sync-stat-list: missing stat-variable
41 !ERROR: expected ')'
42 sync images(1, stat)
44 ! Invalid sync-stat-list: missing 'stat='
45 !ERROR: expected ')'
46 sync images([1], sync_status)
48 !______ invalid sync-stat-lists: invalid errmsg= ____________
50 ! Invalid errmsg-variable keyword
51 !ERROR: expected ')'
52 sync images(*, errormsg=error_message)
54 ! Invalid sync-stat-list: missing 'errmsg='
55 !ERROR: expected ')'
56 sync images([1], error_message)
58 ! Invalid sync-stat-list: missing errmsg-variable
59 !ERROR: expected ')'
60 sync images(*, errmsg)
62 end program test_sync_images