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) {
213213 if (!Ptr.isZero () && !Ptr.isDereferencable ())
214214 return false ;
215215
216+ if (Ptr.pointsToStringLiteral () && Ptr.isArrayRoot ())
217+ return false ;
218+
216219 if (!Ptr.isZero () && !CheckFinalLoad (S, OpPC, Ptr))
217220 return false ;
218221
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
33
44int test1 () {
55 int i;
@@ -11,3 +11,19 @@ int test1() {
1111 for (int i = 0 ; i < 10 ; ++i);
1212}
1313
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