File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,9 @@ template <> bool EvalEmitter::emitRet<PT_Ptr>(const SourceInfo &Info) {
213
213
if (!Ptr.isZero () && !Ptr.isDereferencable ())
214
214
return false ;
215
215
216
+ if (Ptr.pointsToStringLiteral () && Ptr.isArrayRoot ())
217
+ return false ;
218
+
216
219
if (!Ptr.isZero () && !CheckFinalLoad (S, OpPC, Ptr))
217
220
return false ;
218
221
Original file line number Diff line number Diff line change 1
- // RUN: %clang_cc1 -fexperimental-new-constant-interpreter - verify=expected,both -fopenmp %s
2
- // RUN: %clang_cc1 -verify=ref,both -fopenmp %s
1
+ // RUN: %clang_cc1 -verify=expected,both -fopenmp -fopenmp-version=60 %s -fexperimental-new-constant-interpreter
2
+ // RUN: %clang_cc1 -verify=ref,both -fopenmp -fopenmp-version=60 %s
3
3
4
4
int test1 () {
5
5
int i;
@@ -11,3 +11,19 @@ int test1() {
11
11
for (int i = 0 ; i < 10 ; ++i);
12
12
}
13
13
14
+ extern int omp_get_thread_num (void );
15
+
16
+ #define N 64
17
+
18
+ int test2 () {
19
+ int x = 0 ;
20
+ int device_result[N] = {0 };
21
+
22
+ #pragma omp target parallel loop num_threads(strict: N) severity(warning) message("msg")
23
+ for (int i = 0 ; i < N; i++) {
24
+ x = omp_get_thread_num ();
25
+ device_result[i] = i + x;
26
+ }
27
+ }
28
+
29
+
You can’t perform that action at this time.
0 commit comments