inti,lin,step;// expected-note {{initialize the variable 'lin' to silence this warning}} expected-note {{initialize the variable 'step' to silence this warning}}
#pragma omp master taskloop simd linear(i, lin : step) // expected-warning {{variable 'lin' is uninitialized when used here}} expected-warning {{variable 'step' is uninitialized when used here}}
#pragma omp master 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 master taskloop simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
for(intk=0;k<argc;++k)++k;
#pragma omp master 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 master taskloop simd allocate(omp_thread_mem_alloc: v) linear(v:i) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'master taskloop simd' directive}}
for(intk=0;k<argc;++k){i=k;v+=i;}
}
#pragma omp master taskloop simd linear(ref(j))
for(intk=0;k<argc;++k)++k;
#pragma omp master taskloop simd linear(uval(j))
for(intk=0;k<argc;++k)++k;
intv=0;
#pragma omp master taskloop simd linear(v:j)
for(intk=0;k<argc;++k){++k;v+=j;}
#pragma omp master 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 master taskloop simd linear(f)
for(intk=0;k<argc;++k)++k;
#pragma omp master taskloop simd linear(val(f))
for(intk=0;k<argc;++k)++k;
#pragma omp master taskloop simd linear(uval(f))
for(intk=0;k<argc;++k)++k;
#pragma omp master taskloop simd linear(ref(f))
for(intk=0;k<argc;++k)++k;
#pragma omp master 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,z;
int&j=i;
#pragma omp master 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 master taskloop simd linear // expected-error {{expected '(' after 'linear'}}
for(intk=0;k<argc;++k)++k;
#pragma omp master taskloop simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp master 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 master taskloop simd linear(val(i))
for(intk=0;k<argc;++k)++k;
#pragma omp master 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 master taskloop simd linear(ref(j))
for(intk=0;k<argc;++k)++k;
#pragma omp master 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}}