// CHECK: store i32 -1
gi = OBJECT_SIZE_BUILTIN(my_signed_calloc(-2, 1), 0);
}
+
+void *alloc_uchar(unsigned char) __attribute__((alloc_size(1)));
+
+// CHECK-LABEL: @test13
+void test13() {
+ // If 128 were incorrectly seen as negative, the result would become -1.
+ // CHECK: store i32 128,
+ gi = OBJECT_SIZE_BUILTIN(alloc_uchar(128), 0);
+}
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+3 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}}
- // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp distribute collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp distribute parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute parallel for', but found only 1}}
// expected-error@+8 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+6 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
#pragma omp distribute parallel for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute parallel for simd', but found only 1}}
// expected-error@+8 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+6 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) // expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} expected-error 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}}
+// expected-error@+2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) // expected-error {{expression is not an integral constant expression}} expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} expected-error 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+// expected-error@+3 {{expression is not an integral constant expression}}
+// expected-error@+2 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}}
+// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp distribute simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute simd', but found only 1}}
// expected-error@+8 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+6 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+4 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams
#pragma omp distribute simd collapse (foobool(argc)), collapse (true), collapse (-5)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
#pragma omp teams
-#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
-// expected-error@+5 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+5 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
-// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#pragma omp for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp for simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp for simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4{{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error@+5 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+5 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#pragma omp parallel for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp parallel for simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp parallel for simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
{}
#pragma omp target map(b[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
{}
+ #pragma omp target map(b[true:true])
+ {}
#pragma omp target map(: c,f) // expected-error {{missing map type}}
{}
#pragma omp target parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target parallel for', but found only 1}}
// expected-error@+3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
#if __cplusplus >= 201103L
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
#if __cplusplus >= 201103L
// expected-note@-2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target parallel for map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target parallel for map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for map(to: x)
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error@+2 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target parallel for simd map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target parallel map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target parallel for simd map(to: x)
#pragma omp target parallel for simd ordered((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error@+3 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+3 {{argument to 'ordered' clause must be a strictly positive integer value}}
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}}
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
#pragma omp target parallel for simd ordered(foobool(argc)), ordered(true), ordered(-5)
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}}
-// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp target parallel for simd ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#pragma omp target parallel for simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp target parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}}
-// expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp target parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
foo();
#pragma omp target parallel map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
foo();
+#pragma omp target parallel map(l[true:true])
+ foo();
#pragma omp target parallel map(x)
foo();
#pragma omp target parallel map(tofrom: t[:I])
foo();
#pragma omp target parallel map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
foo();
+#pragma omp target parallel map(l[true:true])
+ foo();
#pragma omp target parallel map(x)
foo();
#pragma omp target parallel map(to: x)
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp target simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp target simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}}
-// expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp target simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}}
-// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute map(to: x)
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}}
-// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for map(to: x)
// expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used}}
#endif
// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+1 2 {{expression is not an integral constant expression}}
#pragma omp target teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
#endif
// expected-error@+3 {{expression is not an integral constant expression}}
// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for simd map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute parallel for simd map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute parallel for simd map(to: x)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-error@+6 {{expression is not an integral constant expression}}
// expected-error@+5 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+4 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+4 {{argument to 'collapse' clause must be a strictly positive integer value}}
#if __cplusplus >= 201103L
// expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(l[:-1]) // expected-error 2 {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute simd map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(tofrom: t[:I])
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(l[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
for (i = 0; i < argc; ++i) foo();
+#pragma omp target teams distribute simd map(l[true:true])
+ for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(x)
for (i = 0; i < argc; ++i) foo();
#pragma omp target teams distribute simd map(to: x)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
-#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
{}
#pragma omp target teams map(b[:-1]) // expected-error {{section length is evaluated to a negative value -1}}
{}
+ #pragma omp target teams map(b[true:true])
+ {}
#pragma omp target teams map(always, tofrom: c,f)
{}
#pragma omp taskloop collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp taskloop', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp taskloop simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp taskloop simd', but found only 1}}
// expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}}
- // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp taskloop simd safelen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}}
- // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp taskloop simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp taskloop simd simdlen ((ST > 0) ? 1 + ST : 2)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
// expected-error@+4 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
// expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}}
- // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp taskloop simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
// expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}}
#endif
// expected-error@+4 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
-// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+2 2 {{expression is not an integral constant expression}}
#pragma omp target
#pragma omp teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
#endif
// expected-error@+4 {{expression is not an integral constant expression}}
// expected-error@+3 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
// expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}}
#endif
// expected-error@+4 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
-// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+2 2 {{expression is not an integral constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
#endif
// expected-error@+4 {{expression is not an integral constant expression}}
// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
// expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}}
#endif
// expected-error@+4 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+2 2 {{expression is not an integral constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
#endif
// expected-error@+4 {{expression is not an integral constant expression}}
// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute simd', but found only 1}}
// expected-error@+7 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+6 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+6 {{argument to 'collapse' clause must be a strictly positive integer value}}
// expected-error@+5 2 {{expression is not an integral constant expression}}
#if __cplusplus >= 201103L
// expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
// expected-error@+7 {{expression is not an integral constant expression}}
// expected-error@+6 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}}
#if __cplusplus >= 201103L
// expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
- // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}}
+// expected-error@+3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+1 2 {{expression is not an integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
- // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+ // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
#endif
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}}
+// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}}
+// expected-error@+2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
+// expected-error@+1 {{expression is not an integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
c = 1 >> -0;
c = 1 << -1; // expected-warning {{shift count is negative}}
c = 1 >> -1; // expected-warning {{shift count is negative}}
+ c = 1 << (unsigned)-1; // expected-warning {{shift count >= width of type}}
+ // expected-warning@-1 {{implicit conversion}}
+ c = 1 >> (unsigned)-1; // expected-warning {{shift count >= width of type}}
c = 1 << c;
c <<= 0;
c >>= 0;
--- /dev/null
+// RUN: %clang_cc1 -std=c++14 -fsyntax-only %s
+
+#include <limits.h>
+
+constexpr unsigned inc() {
+ unsigned i = INT_MAX;
+ ++i; // should not warn value is outside range
+ return i;
+}
+
+constexpr unsigned dec() {
+ unsigned i = INT_MIN;
+ --i; // should not warn value is outside range
+ return i;
+}