[Transforms] Silence a warning in SROA.cpp (NFC)
[llvm-project.git] / openmp / runtime / test / tasking / issue-69368.c
blob57bd7412a51e92604a401ef4a9c4b61a0db95985
1 // RUN: %libomp-compile-and-run
2 // RUN: env OMP_NUM_THREADS=1 %libomp-run
4 int main() {
5 int i;
6 int a[2];
7 volatile int attempt = 0;
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;
15 if (a[0] != 2 || a[1] != 2)
16 return 1;
18 #pragma omp teams distribute parallel for if (attempt >= 2)
19 for (int i = 0; i < 2; i++) {
20 a[i] = 1;
22 if (a[0] != 1 || a[1] != 1)
23 return 1;
26 return 0;