#pragma omp taskloop simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
for(intk=0;k<argc;++k)++k;
#pragma omp parallel
{
intv=0;
inti;
#pragma omp taskloop simd linear(v:i)
for(intk=0;k<argc;++k){i=k;v+=i;}
}
#pragma omp taskloop simd linear(ref(j))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(uval(j))
for(intk=0;k<argc;++k)++k;
intv=0;
#pragma omp taskloop simd linear(v:j)
for(intk=0;k<argc;++k){++k;v+=j;}
#pragma omp taskloop simd linear(i)
for(intk=0;k<argc;++k)++k;
return0;
}
namespaceA{
doublex;
#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
}
namespaceC{
usingA::x;
}
voidlinear_modifiers(intargc){
int&f=argc;
#pragma omp taskloop simd linear(f)
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(val(f))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(uval(f))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(ref(f))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(foo(f)) // expected-error {{expected one of 'ref', val' or 'uval' modifiers}}
for(intk=0;k<argc;++k)++k;
}
intf;
intmain(intargc,char**argv){
doubledarr[100];
// expected-note@+1 {{in instantiation of function template specialization 'test_template<-4, double, int>' requested here}}
test_template<-4>(darr,4);
// expected-note@+1 {{in instantiation of function template specialization 'test_warn<0>' requested here}}
test_warn<0>();
S4e(4);// expected-note {{'e' defined here}}
S5g(5);// expected-note {{'g' defined here}}
inti;
int&j=i;
#pragma omp taskloop simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear // expected-error {{expected '(' after 'linear'}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear () // expected-error {{expected expression}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear (val // expected-error {{use of undeclared identifier 'val'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear (ref()) // expected-error {{expected expression}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear (foo()) // expected-error {{expected expression}}
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
// expected-error@+2 {{argument of a linear clause should be of integral or pointer type, not 'S4'}}
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S5'}}
#pragma omp taskloop simd linear(val(e, g))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(h, C::x) // expected-error 2 {{threadprivate or thread local variable cannot be linear}}
for(intk=0;k<argc;++k)++k;
#pragma omp parallel
{
inti;
#pragma omp taskloop simd linear(val(i))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(uval(i) : 4) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
for(intk=0;k<argc;++k){++k;i+=4;}
}
#pragma omp taskloop simd linear(ref(j))
for(intk=0;k<argc;++k)++k;
#pragma omp taskloop simd linear(i)
for(intk=0;k<argc;++k)++k;
foomain<int,char>(argc,argv);// expected-note {{in instantiation of function template specialization 'foomain<int, char>' requested here}}