[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / omp-resolve04.f90
blob147dc1ae7b945adc015af1f395d472a5e51a4e21
1 ! RUN: %python %S/test_errors.py %s %flang -fopenmp
3 ! 2.15.3 Data-Sharing Attribute Clauses
4 ! A list item that specifies a given variable may not appear in more than
5 ! one clause on the same directive, except that a variable may be specified
6 ! in both firstprivate and lastprivate clauses.
8 common /c/ a, b
9 integer a(3), b
11 A = 1
12 B = 2
13 !ERROR: 'c' appears in more than one data-sharing clause on the same OpenMP directive
14 !$omp parallel shared(/c/,c) private(/c/)
15 a(1:2) = 3
16 B = 4
17 !$omp end parallel
18 print *, a, b, c
19 end