We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6d4b7e commit de62872Copy full SHA for de62872
clang/tools/sotoc/test/target/multiple_regions2.c
@@ -0,0 +1,34 @@
1
+// RUN: %sotoc-transform-compile
2
+// RUN: %run-on-host | %filecheck %s
3
+
4
+#include <stdio.h>
5
6
+int main() {
7
8
+ int i = 0;
9
+ int j = 0;
10
11
+ #pragma omp target
12
+ {
13
14
+ #pragma omp parallel for private(j)
15
+ for(i=0; i<42; i++)
16
17
+ for(i=0; i<42; i++){}
18
+ }
19
20
+ #pragma omp parallel for
21
22
23
+ #pragma omp atomic
24
+ j++;
25
26
27
+ printf("%d\n", j);
28
+ fflush(0);
29
30
31
+ return 0;
32
+}
33
34
+// CHECK: 42
0 commit comments