int main(int argc, char **argv) { S4 e(4); S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); int i; int &j = i; #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}} {} #pragma omp target firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} {} #pragma omp target firstprivate() // expected-error {{expected expression}} {} #pragma omp target firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} {} #pragma omp target firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} {} #pragma omp target firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} {} #pragma omp target firstprivate(argc) {} #pragma omp target firstprivate(S1) // expected-error {{'S1' does not refer to a value}} {} #pragma omp target firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} {} #pragma omp target firstprivate(argv[1]) // expected-error {{expected variable name}} {} #pragma omp target firstprivate(e, g) {} #pragma omp target firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} {} #pragma omp target firstprivate(B::x) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} {} #pragma omp target shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp target'}} #pragma omp parallel { int i; } #pragma omp parallel shared(i) #pragma omp parallel firstprivate(i) #pragma omp target firstprivate(j) {} #pragma omp target firstprivate(i) {} static int si; #pragma omp target firstprivate(si) // OK {} #pragma omp target map(i) firstprivate(i) // expected-error {{firstprivate variable cannot be in a map clause in '#pragma omp target' directive}} {} s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} }
int main(int argc, char **argv) { S4 e(4); S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); int i; int &j = i; #pragma omp taskloop private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private() // expected-error {{expected expression}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(argc) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(a, b) // expected-error {{private variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(h) // expected-error {{threadprivate or thread local variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(B::x) // expected-error {{threadprivate or thread local variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop shared(i) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel { int i; #pragma omp taskloop private(i) for (int k = 0; k < argc; ++k) ++k; } #pragma omp parallel shared(i) #pragma omp parallel private(i) #pragma omp taskloop private(j) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(i) for (int k = 0; k < argc; ++k) ++k; static int si; #pragma omp taskloop private(si) // OK for(int k = 0; k < argc; ++k) si = k + 1; s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} }
int main(int argc, char **argv) { S4 e(4); S5 g(5); S6<float> s6(0.0) , s6_0(1.0); S7<S6<float> > s7(0.0) , s7_0(1.0); int i; int &j = i; #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}} { foo(); } #pragma omp parallel sections private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} { foo(); } #pragma omp parallel sections private() // expected-error {{expected expression}} { foo(); } #pragma omp parallel sections private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} { foo(); } #pragma omp parallel sections private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} { foo(); } #pragma omp parallel sections private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} { foo(); } #pragma omp parallel sections private(argc) { foo(); } #pragma omp parallel sections private(S1) // expected-error {{'S1' does not refer to a value}} { foo(); } #pragma omp parallel sections private(a, b) // expected-error {{private variable with incomplete type 'S1'}} { foo(); } #pragma omp parallel sections private(argv[1]) // expected-error {{expected variable name}} { foo(); } #pragma omp parallel sections private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} { foo(); } #pragma omp parallel sections private(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} { foo(); } #pragma omp parallel sections copyprivate(h) // expected-error {{unexpected OpenMP clause 'copyprivate' in directive '#pragma omp parallel sections'}} { foo(); } #pragma omp parallel { int i; #pragma omp parallel sections private(i) { foo(); } } #pragma omp parallel shared(i) #pragma omp parallel private(i) #pragma omp parallel sections private(j) { foo(); } #pragma omp parallel sections private(i) { foo(); } static int m; #pragma omp parallel sections private(m) { foo(); } s6 = s6_0; // expected-note {{in instantiation of member function 'S6<float>::operator=' requested here}} s7 = s7_0; // expected-note {{in instantiation of member function 'S7<S6<float> >::operator=' requested here}} return foomain(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}} }