[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / sync-critical01.f90
blobb597eb17ea22670850e9babe1ed7a188e7d23b05
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
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
10 !$OMP CRITICAL
11 t = t + 1
12 !$OMP END CRITICAL
14 !$OMP CRITICAL (foo)
15 t = t + 1
16 !$OMP END CRITICAL (foo)
18 !$OMP CRITICAL (foo)
19 t = t + 1
20 !ERROR: CRITICAL directive names do not match
21 !$OMP END CRITICAL (bar)
23 !$OMP CRITICAL (bar)
24 t = t + 1
25 !ERROR: CRITICAL directive names do not match
26 !$OMP END CRITICAL (foo)
28 !ERROR: CRITICAL directive names do not match
29 !$OMP CRITICAL (bar)
30 t = t + 1
31 !$OMP END CRITICAL
33 !$OMP CRITICAL
34 t = t + 1
35 !ERROR: CRITICAL directive names do not match
36 !$OMP END CRITICAL (foo)
38 timer_tick_sec = t
39 return
41 end function timer_tick_sec