Debian Codegraph @

flang/test/Semantics/OpenMP/sync-critical01.f90

raw
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
2
3 ! OpenMP Version 5.0
4 ! 2.17.1 critical construct
5 ! CRITICAL start and end CRITICAL directive names mismatch
6 integer function timer_tick_sec()
7 implicit none
8 integer t
9
10 !$OMP CRITICAL
11 t = t + 1
12 !$OMP END CRITICAL
13
14 !$OMP CRITICAL (foo)
15 t = t + 1
16 !$OMP END CRITICAL (foo)
17
18 !$OMP CRITICAL (foo)
19 t = t + 1
20 !ERROR: CRITICAL directive names do not match
21 !$OMP END CRITICAL (bar)
22
23 !$OMP CRITICAL (bar)
24 t = t + 1
25 !ERROR: CRITICAL directive names do not match
26 !$OMP END CRITICAL (foo)
27
28 !ERROR: CRITICAL directive names do not match
29 !$OMP CRITICAL (bar)
30 t = t + 1
31 !$OMP END CRITICAL
32
33 !$OMP CRITICAL
34 t = t + 1
35 !ERROR: CRITICAL directive names do not match
36 !$OMP END CRITICAL (foo)
37
38 timer_tick_sec = t
39 return
40
41 end function timer_tick_sec