Debian Codegraph @

gcc/testsuite/gcc.dg/gomp/pr44085.c

raw
1 /* PR middle-end/44085 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target tls_native } */
4 /* { dg-options "-fopenmp" } */
5
6 int thr1, thr2;
7 #pragma omp threadprivate (thr1, thr2)
8
9 void
10 foo (void)
11 {
12 #pragma omp task untied /* { dg-message "note: enclosing task" } */
13 {
14 thr1++; /* { dg-error "used in untied task" } */
15 thr2 |= 4; /* { dg-error "used in untied task" } */
16 }
17 }
18
19 void
20 bar (void)
21 {
22 #pragma omp task
23 {
24 thr1++;
25 thr2 |= 4;
26 }
27 }