forked from OSchip/llvm-project
[OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
NFC. llvm-svn: 365334
This commit is contained in:
parent
320a28200f
commit
a914888b49
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
struct St{
|
||||
int a;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
int foo() {
|
||||
L1:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
int foo() {
|
||||
L1:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, class S> // expected-note {{declared here}}
|
||||
int tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp parallel
|
||||
{
|
||||
#pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -20,7 +21,7 @@ int tmain(T argc, S **argv) {
|
|||
#pragma omp cancel parallel if () // expected-error {{expected expression}}
|
||||
#pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
#pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
|
||||
#pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
|
||||
#pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] + z)
|
||||
#pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
|
||||
#pragma omp cancel parallel if (S) // expected-error {{'S' does not refer to a value}}
|
||||
#pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -40,6 +41,7 @@ int tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp parallel
|
||||
{
|
||||
#pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -47,7 +49,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp cancel parallel if () // expected-error {{expected expression}}
|
||||
#pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
#pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
|
||||
#pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
|
||||
#pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] - z)
|
||||
#pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
|
||||
#pragma omp cancel parallel if (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
#pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
#pragma omp cancellation // expected-error {{expected an OpenMP directive}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
int foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
int temp; // expected-note 6 {{'temp' declared here}}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s -Wuninitialized
|
||||
|
||||
int temp; // expected-note 7 {{'temp' declared here}}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ T tmain(T argc) {
|
|||
T b = argc, c, d, e, f, g;
|
||||
char ** argv;
|
||||
static T a;
|
||||
// CHECK: static T a;
|
||||
T z;
|
||||
#pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -31,7 +31,7 @@ T tmain(T argc) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
|
@ -41,6 +41,7 @@ T tmain(T argc) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -55,7 +56,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute dist_schedule (static), dist_schedule (static, 1 -z ) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration
|
|||
extern S1 a;
|
||||
class S2 {
|
||||
mutable int a;
|
||||
|
||||
|
||||
public:
|
||||
S2() : a(0) {}
|
||||
S2(const S2 &s2) : a(s2.a) {}
|
||||
|
@ -26,7 +26,7 @@ const S2 ba[5];
|
|||
class S3 {
|
||||
int a;
|
||||
S3 &operator=(const S3 &s3);
|
||||
|
||||
|
||||
public:
|
||||
S3() : a(0) {} // expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
|
||||
S3(S3 &s3) : a(s3.a) {} // expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
|
||||
|
@ -65,7 +65,7 @@ int main(int argc, char **argv) {
|
|||
S4 e(4);
|
||||
S5 g(5);
|
||||
S6 p;
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
@ -111,7 +111,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute firstprivate(da)
|
||||
#pragma omp distribute firstprivate(da, z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,10 +13,9 @@ struct S1; // expected-note {{declared here}} expected-note {{declared here}}
|
|||
|
||||
template <class T, int N>
|
||||
T tmain(T argc) {
|
||||
T b = argc, c, d, e, f, g;
|
||||
T b = argc, c, d, e, f, g, z;
|
||||
char ** argv;
|
||||
static T a;
|
||||
// CHECK: static T a;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
|
@ -47,7 +46,7 @@ T tmain(T argc) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -61,6 +60,7 @@ T tmain(T argc) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
|
@ -91,7 +91,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
C g(5);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -126,7 +126,7 @@ int foomain(int argc, char **argv) {
|
|||
++k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
|
||||
#pragma omp distribute parallel for firstprivate(k, h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel
|
||||
|
@ -189,7 +189,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -294,7 +294,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
|
||||
#pragma omp distribute parallel for firstprivate(k, h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, class S> // expected-note {{declared here}}
|
||||
int tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -56,7 +56,7 @@ int tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for if(argc)
|
||||
#pragma omp distribute parallel for if(argc+z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -158,7 +158,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for if(parallel : argc)
|
||||
#pragma omp distribute parallel for if(parallel : argc-z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
|
@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for num_threads (argc)
|
||||
#pragma omp distribute parallel for num_threads (argc + z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
|
@ -82,7 +82,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
|
||||
#pragma omp distribute parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -88,7 +88,7 @@ T tmain(T argc) {
|
|||
const T d = T(); // expected-note 4 {{'d' defined here}}
|
||||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
T i, z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -176,7 +176,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
|
||||
#pragma omp distribute parallel for reduction(+ : ba, z) // expected-error {{const-qualified variable cannot be reduction}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -272,7 +272,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -434,7 +434,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel private(fl)
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for reduction(+ : fl)
|
||||
#pragma omp distribute parallel for reduction(+ : fl, z)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel reduction(* : fl)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
|
@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
|
|||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
|
||||
#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
|
@ -124,7 +126,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
|
||||
#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
|
||||
struct S1; // expected-note 2 {{declared here}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
struct B {
|
||||
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ T tmain(T argc) {
|
|||
T b = argc, c, d, e, f, g;
|
||||
char ** argv;
|
||||
static T a;
|
||||
// CHECK: static T a;
|
||||
T k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
|
@ -47,7 +47,7 @@ T tmain(T argc) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -61,6 +61,7 @@ T tmain(T argc) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
|
@ -91,7 +92,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -67,7 +67,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
C g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -101,7 +101,7 @@ int foomain(int argc, char **argv) {
|
|||
++k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd firstprivate(argc)
|
||||
#pragma omp distribute parallel for simd firstprivate(argc, z)
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp target
|
||||
|
@ -189,7 +189,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -248,7 +248,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd firstprivate(ba) // OK
|
||||
#pragma omp distribute parallel for simd firstprivate(ba, z) // OK
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, class S> // expected-note {{declared here}}
|
||||
int tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -32,7 +32,7 @@ int tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
|
||||
|
@ -114,7 +114,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -69,7 +69,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
|
|||
++k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd lastprivate(argc)
|
||||
#pragma omp distribute parallel for simd lastprivate(argc, z)
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp target
|
||||
|
@ -178,7 +178,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -237,7 +237,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd lastprivate(ba)
|
||||
#pragma omp distribute parallel for simd lastprivate(ba, z)
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
namespace X {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
class S {
|
||||
int a;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
|
||||
|
||||
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}}
|
||||
#pragma omp distribute parallel for simd
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
|
@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
#pragma omp distribute parallel for simd num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
|
@ -82,7 +82,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
#pragma omp distribute parallel for simd num_threads (z/argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -88,7 +88,7 @@ T tmain(T argc) {
|
|||
const T d = T(); // expected-note 4 {{'d' defined here}}
|
||||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
T i, z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -151,7 +151,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd reduction(&& : argc)
|
||||
#pragma omp distribute parallel for simd reduction(&& : argc, z)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -272,7 +272,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -400,7 +400,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}}
|
||||
#pragma omp distribute parallel for simd reduction(+ : z, o) // expected-error {{no viable overloaded '='}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
|
@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
|
|||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
|
||||
#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
|
@ -124,7 +126,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
|
||||
#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 -z)
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
// expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
|
||||
struct S1; // expected-note 2 {{declared here}}
|
||||
|
@ -54,7 +54,7 @@ T tmain(T argc, S **argv) {
|
|||
const int da[5] = { 0 };
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
int acc = 0;
|
||||
int n = 1000;
|
||||
|
@ -103,7 +103,7 @@ T tmain(T argc, S **argv) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared (argc)
|
||||
#pragma omp distribute parallel for simd shared (argc, z)
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ int main(int argc, char **argv) {
|
|||
const int da[5] = { 0 };
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
int acc = 0;
|
||||
int n = argc;
|
||||
|
@ -277,7 +277,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute parallel for simd shared (argc)
|
||||
#pragma omp distribute parallel for simd shared (argc, z)
|
||||
for(int k = 0 ; k < n ; k++) {
|
||||
acc++;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -34,7 +34,7 @@ class S4 {
|
|||
public:
|
||||
S4(int v):a(v) { }
|
||||
};
|
||||
class S5 {
|
||||
class S5 {
|
||||
int a;
|
||||
S5():a(0) {} // expected-note {{implicitly declared private here}}
|
||||
public:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
struct B {
|
||||
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ T tmain(T argc) {
|
|||
T b = argc, c, d, e, f, g;
|
||||
char ** argv;
|
||||
static T a;
|
||||
// CHECK: static T a;
|
||||
T z;
|
||||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -55,7 +55,7 @@ T tmain(T argc) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -69,6 +69,7 @@ T tmain(T argc) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
|
||||
|
@ -106,7 +107,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
|
||||
for (int i = 0; i < 10; ++i) foo();
|
||||
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -67,7 +67,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
C g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -111,7 +111,7 @@ int foomain(int argc, char **argv) {
|
|||
++k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
|
||||
#pragma omp distribute simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp target
|
||||
|
@ -189,7 +189,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -223,7 +223,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd firstprivate(argc)
|
||||
#pragma omp distribute simd firstprivate(argc, z)
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -69,7 +69,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
|
@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
|
|||
++k;
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd lastprivate(argc)
|
||||
#pragma omp distribute simd lastprivate(argc, z)
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
namespace X {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
static int sii;
|
||||
// expected-note@+1 {{defined as threadprivate or thread local}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
|
||||
|
||||
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute simd'}}
|
||||
#pragma omp distribute simd
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -89,6 +89,7 @@ T tmain(T argc) {
|
|||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
long z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -156,7 +157,7 @@ T tmain(T argc) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
|
||||
#pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
@ -272,7 +273,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -335,7 +336,7 @@ int main(int argc, char **argv) {
|
|||
foo();
|
||||
#pragma omp target
|
||||
#pragma omp teams
|
||||
#pragma omp distribute simd reduction(&& : argc)
|
||||
#pragma omp distribute simd reduction(&& : z, argc)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp target
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
struct S1 { // expected-note 2 {{declared here}}
|
||||
int a;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
|
|||
// expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
|
||||
// expected-error@+2 2 {{expression is not an integral constant expression}}
|
||||
// expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
|
||||
#pragma omp for collapse (argc
|
||||
#pragma omp for collapse (argc
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
|
||||
#pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -172,7 +172,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
|
||||
|
@ -207,7 +207,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
|
||||
#pragma omp for firstprivate(a, b, c, d, f, k) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -69,7 +69,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
|
@ -112,7 +112,7 @@ int foomain(int argc, char **argv) {
|
|||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
|
||||
#pragma omp for lastprivate(k, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel
|
||||
|
@ -163,7 +163,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
|
@ -190,7 +190,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for lastprivate(argc)
|
||||
#pragma omp for lastprivate(argc, k)
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
namespace X {
|
||||
|
@ -104,7 +104,7 @@ S3 h;
|
|||
template<class I, class C> int foomain(I argc, C **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp for linear // expected-error {{expected '(' after 'linear'}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
|
@ -128,7 +128,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
|||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for linear(e, g)
|
||||
#pragma omp for linear(e, g, k)
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
|
@ -170,7 +170,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
S4 e(4); // expected-note {{'e' defined here}}
|
||||
S5 g(5); // expected-note {{'g' defined here}}
|
||||
int i;
|
||||
int i, k;
|
||||
int &j = i;
|
||||
#pragma omp for linear // expected-error {{expected '(' after 'linear'}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
|
@ -190,7 +190,7 @@ int main(int argc, char **argv) {
|
|||
for (int k = 0; k < argc; ++k) ++k;
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp for linear(a, b)
|
||||
#pragma omp for linear(a, b, k)
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
class S {
|
||||
int a;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
|
||||
|
||||
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}}
|
||||
#pragma omp for
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -88,7 +88,7 @@ T tmain(T argc) {
|
|||
const T d = T(); // expected-note 4 {{'d' defined here}}
|
||||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
T i, z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -147,11 +147,11 @@ T tmain(T argc) {
|
|||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
#pragma omp for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
|
||||
#pragma omp for reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
@ -245,7 +245,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -312,7 +312,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for reduction(max : argv[1])
|
||||
#pragma omp for reduction(max : argv[1], z)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -45,7 +46,7 @@ T tmain(T argc, S **argv) {
|
|||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2)
|
||||
#pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
@ -82,6 +83,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -98,7 +100,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
|
||||
#pragma omp for schedule (static, 2+2-z)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
struct B {
|
||||
static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -69,7 +69,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
|
@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
|
|||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
|
||||
#pragma omp for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel
|
||||
|
@ -160,7 +160,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
|
@ -187,7 +187,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd lastprivate(argc)
|
||||
#pragma omp for simd lastprivate(argc, z)
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
namespace X {
|
||||
|
@ -137,8 +137,9 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
|||
#pragma omp parallel
|
||||
{
|
||||
int v = 0;
|
||||
long z;
|
||||
int i;
|
||||
#pragma omp for simd linear(v:i)
|
||||
#pragma omp for simd linear(z, v:i)
|
||||
for (int k = 0; k < argc; ++k) { i = k; v += i; }
|
||||
}
|
||||
#pragma omp for simd linear(j)
|
||||
|
@ -188,7 +189,7 @@ int main(int argc, char **argv) {
|
|||
for (int k = 0; k < argc; ++k) ++k;
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp for simd linear (a, b)
|
||||
#pragma omp for simd linear(a, b)
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
|
@ -201,7 +202,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel
|
||||
{
|
||||
int i;
|
||||
#pragma omp for simd linear(i)
|
||||
#pragma omp for simd linear(i : i)
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#pragma omp for simd linear(i : 4)
|
||||
for (int k = 0; k < argc; ++k) { ++k; i += 4; }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
class S {
|
||||
int a;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
|
||||
|
||||
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}}
|
||||
#pragma omp for simd
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -87,7 +87,7 @@ T tmain(T argc) {
|
|||
const T d = T(); // expected-note 4 {{'d' defined here}}
|
||||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
T i, z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -146,7 +146,7 @@ T tmain(T argc) {
|
|||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
#pragma omp for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
@ -236,7 +236,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -287,7 +287,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
#pragma omp for simd reduction(&& : argc)
|
||||
#pragma omp for simd reduction(&& : argc, z)
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
|
|||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
|
||||
#pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -72,7 +74,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
|
||||
#pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
// expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
int foo();
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
int foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -63,7 +63,7 @@ int main(int argc, char **argv) {
|
|||
const int da[5] = { 0 };
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
static int m;
|
||||
#pragma omp parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}
|
||||
|
@ -75,7 +75,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel firstprivate (argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
|
||||
#pragma omp parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
#pragma omp parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
|
||||
#pragma omp parallel firstprivate (d)
|
||||
#pragma omp parallel firstprivate (z, d)
|
||||
d = 5; // expected-error {{cannot assign to variable 'd' with const-qualified type}}
|
||||
#pragma omp parallel firstprivate (argv[1]) // expected-error {{expected variable name}}
|
||||
#pragma omp parallel firstprivate(ba)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -67,7 +67,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
C g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
|
@ -93,7 +93,7 @@ int foomain(int argc, char **argv) {
|
|||
#pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
|
||||
#pragma omp parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, class S> // expected-note {{declared here}}
|
||||
int tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, z;
|
||||
#pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if(argc)
|
||||
#pragma omp parallel for if(argc/z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
@ -55,7 +55,7 @@ int tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i,z;
|
||||
#pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -86,7 +86,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if(parallel : argc)
|
||||
#pragma omp parallel for if(parallel : z*argc)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -69,7 +69,7 @@ template <class I, class C>
|
|||
int foomain(int argc, char **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
|
@ -95,7 +95,7 @@ int foomain(int argc, char **argv) {
|
|||
#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
|
||||
#pragma omp parallel for lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}}
|
||||
|
@ -143,7 +143,7 @@ int main(int argc, char **argv) {
|
|||
S5 g(5);
|
||||
S3 m;
|
||||
S6 n(2);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
|
@ -163,7 +163,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for lastprivate(argc)
|
||||
#pragma omp parallel for lastprivate(argc, z)
|
||||
for (i = 0; i < argc; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
namespace X {
|
||||
|
@ -120,7 +120,7 @@ template <class I, class C>
|
|||
int foomain(I argc, C **argv) {
|
||||
I e(4);
|
||||
I g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
|
@ -140,7 +140,7 @@ int foomain(I argc, C **argv) {
|
|||
#pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for linear(argc : 5)
|
||||
#pragma omp parallel for linear(argc, z : 5)
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
|
||||
|
@ -205,7 +205,7 @@ int main(int argc, char **argv) {
|
|||
|
||||
S4 e(4); // expected-note {{'e' defined here}}
|
||||
S5 g(5); // expected-note {{'g' defined here}}
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i;
|
||||
#pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
|
@ -225,7 +225,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for linear(argc)
|
||||
#pragma omp parallel for linear(argc, z)
|
||||
for (int k = 0; k < argc; ++k)
|
||||
++k;
|
||||
#pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
|
||||
|
||||
class S {
|
||||
int a;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
|
||||
|
||||
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
|
||||
#pragma omp parallel for
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T i;
|
||||
T i, z;
|
||||
#pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (argc)
|
||||
#pragma omp parallel for num_threads (argc+z)
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
int i, z;
|
||||
#pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -50,7 +50,7 @@ int main(int argc, char **argv) {
|
|||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
||||
#pragma omp parallel for num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
#pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
|
||||
for (i = 0; i < argc; ++i) foo();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
||||
|
||||
void foo();
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
|
||||
|
||||
extern int omp_default_mem_alloc;
|
||||
void foo() {
|
||||
|
@ -92,7 +92,7 @@ T tmain(T argc) {
|
|||
const T d = T(); // expected-note 4 {{'d' defined here}}
|
||||
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
|
||||
T qa[5] = {T()};
|
||||
T i;
|
||||
T i, z;
|
||||
T &j = i; // expected-note 4 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
|
||||
|
@ -137,7 +137,7 @@ T tmain(T argc) {
|
|||
#pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
|
||||
|
@ -214,7 +214,7 @@ int main(int argc, char **argv) {
|
|||
int qa[5] = {0};
|
||||
S4 e(4);
|
||||
S5 g(5);
|
||||
int i;
|
||||
int i, z;
|
||||
int &j = i; // expected-note 2 {{'j' defined here}}
|
||||
S3 &p = k; // expected-note 2 {{'p' defined here}}
|
||||
const int &r = da[i]; // expected-note {{'r' defined here}}
|
||||
|
@ -259,7 +259,7 @@ int main(int argc, char **argv) {
|
|||
#pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
|
||||
#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
|
||||
for (int i = 0; i < 10; ++i)
|
||||
foo();
|
||||
#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
||||
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
||||
|
||||
void foo() {
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
|
|||
|
||||
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
|
||||
T tmain(T argc, S **argv) {
|
||||
T z;
|
||||
#pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
|
|||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
#pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
|
||||
#pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
|
||||
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
|
||||
// expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
@ -56,6 +57,7 @@ T tmain(T argc, S **argv) {
|
|||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int z;
|
||||
#pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
|
@ -74,7 +76,7 @@ int main(int argc, char **argv) {
|
|||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
#pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
|
||||
#pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
|
||||
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
|
||||
// expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
|
||||
// expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue