LLVM OpenMP 20.0.0git
issue-69368.c
Go to the documentation of this file.
1// RUN: %libomp-compile-and-run
2// RUN: env OMP_NUM_THREADS=1 %libomp-run
3
4int main() {
5 int i;
6 int a[2];
7 volatile int attempt = 0;
8
9 for (i = 0; i < 10; ++i) {
10 a[0] = a[1] = 0;
11#pragma omp parallel for
12 for (int i = 0; i < 2; i++) {
13 a[i] = 2;
14 }
15 if (a[0] != 2 || a[1] != 2)
16 return 1;
17
18#pragma omp teams distribute parallel for if (attempt >= 2)
19 for (int i = 0; i < 2; i++) {
20 a[i] = 1;
21 }
22 if (a[0] != 1 || a[1] != 1)
23 return 1;
24 }
25
26 return 0;
27}
int main()
Definition: issue-69368.c:4
#define i
Definition: kmp_stub.cpp:87
int a