Changeset View
Changeset View
Standalone View
Standalone View
test/OpenMP/parallel_for_firstprivate_messages.cpp
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Line(s) | |||||
247 | #pragma omp parallel private(i) | 247 | #pragma omp parallel private(i) | ||
248 | #pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}} | 248 | #pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}} | ||
249 | for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}} | 249 | for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}} | ||
250 | foo(); | 250 | foo(); | ||
251 | #pragma omp parallel reduction(+ : i) | 251 | #pragma omp parallel reduction(+ : i) | ||
252 | #pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}} | 252 | #pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}} | ||
253 | for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}} | 253 | for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}} | ||
254 | foo(); | 254 | foo(); | ||
255 | static int si; | ||||
256 | #pragma omp parallel for firstprivate(si) // OK | ||||
257 | for (i = 0; i < argc; ++i) | ||||
258 | si = i + 1; | ||||
255 | 259 | | |||
256 | return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} | 260 | return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}} | ||
257 | } | 261 | } |