2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / pr44085.f90
blobdb8fbbc9544f0d0a628a8a1406adccb3b39e2f5e
1 ! PR middle-end/44085
2 ! { dg-do compile }
3 ! { dg-require-effective-target tls_native }
4 ! { dg-options "-fopenmp" }
6 integer, save :: thr1, thr2
7 integer :: thr3, thr4
8 common /thrs/ thr3, thr4
9 !$omp threadprivate (thr1, thr2, /thrs/)
11 !$omp task untied ! { dg-error "enclosing task" }
12 thr1 = thr1 + 1 ! { dg-error "used in untied task" }
13 thr2 = thr2 + 2 ! { dg-error "used in untied task" }
14 thr3 = thr3 + 3 ! { dg-error "used in untied task" }
15 thr4 = thr4 + 4 ! { dg-error "used in untied task" }
16 !$omp end task
18 !$omp task
19 thr1 = thr1 + 1
20 thr2 = thr2 + 2
21 thr3 = thr3 + 3
22 thr4 = thr4 + 4
23 !$omp end task
25 end