Changeset View
Changeset View
Standalone View
Standalone View
test/OpenMP/sections_reduction_messages.cpp
Show First 20 Lines • Show All 410 Lines • ▼ Show 20 Lines | #pragma omp sections reduction(+ : fl) // expected-error {{reduction variable must be shared}} | ||||
{ | { | ||||
foo(); | foo(); | ||||
} | } | ||||
#pragma omp parallel reduction(* : fl) // expected-note {{defined as reduction}} | #pragma omp parallel reduction(* : fl) // expected-note {{defined as reduction}} | ||||
#pragma omp sections reduction(+ : fl) // expected-error {{reduction variable must be shared}} | #pragma omp sections reduction(+ : fl) // expected-error {{reduction variable must be shared}} | ||||
{ | { | ||||
foo(); | foo(); | ||||
} | } | ||||
static int m; | |||||
#pragma omp sections reduction(+ : m) // OK | |||||
{ | |||||
foo(); | |||||
} | |||||
return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}} | return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}} | ||||
} | } |