[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-sync-critical01.f90
blob7c80076c6fe2cc48a835ff4eb512124d53532426
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