Ttmain(Targc){// expected-note 2 {{'argc' defined here}}
constTd=T();// expected-note 4 {{'d' defined here}}
constTda[5]={T()};// expected-note 2 {{'da' defined here}}
Tqa[5]={T()};
Ti;
T&j=i;// expected-note 4 {{'j' defined here}}
S3&p=k;// expected-note 2 {{'p' defined here}}
constT&r=da[(int)i];// expected-note 2 {{'r' defined here}}
T&q=qa[(int)i];// expected-note 2 {{'q' defined here}}
Tfl;// expected-note {{'fl' defined here}}
#pragma omp parallel
#pragma omp for reduction // expected-error {{expected '(' after 'reduction'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : argc)
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{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(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel private(k)
#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel shared(i)
#pragma omp parallel reduction(min : i)
#pragma omp for reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel private(fl) // expected-note 2 {{defined as private}}
#pragma omp for reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
#pragma omp for reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
for(inti=0;i<10;++i)
foo();
returnT();
}
intmain(intargc,char**argv){
constintd=5;// expected-note 2 {{'d' defined here}}
constintda[5]={0};// expected-note {{'da' defined here}}
intqa[5]={0};
S4e(4);// expected-note {{'e' defined here}}
S5g(5);// expected-note {{'g' defined here}}
inti;
int&j=i;// expected-note 2 {{'j' defined here}}
S3&p=k;// expected-note 2 {{'p' defined here}}
constint&r=da[i];// expected-note {{'r' defined here}}
int&q=qa[i];// expected-note {{'q' defined here}}
floatfl;// expected-note {{'fl' defined here}}
#pragma omp parallel
#pragma omp for reduction // expected-error {{expected '(' after 'reduction'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp for reduction(~ : argc) // expected-error {{expected unqualified-id}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : argc)
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{reduction variable 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}}
#pragma omp for reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel private(k)
#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel
#pragma omp for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel shared(i)
#pragma omp parallel reduction(min : i)
#pragma omp for reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
for(inti=0;i<10;++i)
foo();
#pragma omp parallel private(fl) // expected-note {{defined as private}}
#pragma omp for reduction(+ : fl) // expected-error {{reduction variable must be shared}}