1 /* { dg-do compile } */
2 /* { dg-require-effective-target tls } */
6 extern void bar (void);
9 #pragma omp threadprivate (t)
15 struct S
{ int i
; int j
; } s
;
20 #pragma omp p shared (x, x) /* { dg-error "more than once" } */
22 #pragma omp p private (x) private (x) /* { dg-error "more than once" } */
24 #pragma omp p shared (x) firstprivate (x) /* { dg-error "more than once" } */
26 #pragma omp p firstprivate (x, x) /* { dg-error "more than once" } */
28 #pragma omp p for shared (x) lastprivate (x) /* { dg-error "more than" } */
29 for (i
= 0; i
< 10; i
++)
31 #pragma omp p for private (x) lastprivate (x) /* { dg-error "more than" } */
32 for (i
= 0; i
< 10; i
++)
34 #pragma omp p for lastprivate (x, x) /* { dg-error "more than once" } */
35 for (i
= 0; i
< 10; i
++)
37 #pragma omp p for linear (x, x) /* { dg-error "more than once" } */
38 for (i
= 0; i
< 10; i
++)
40 #pragma omp single private (x) copyprivate (x) /* { dg-error "more than" } */
42 #pragma omp p shared (bar) /* { dg-error "is not a variable" } */
44 #pragma omp p private (bar) /* { dg-error "is not a variable" } */
46 #pragma omp p firstprivate (bar) /* { dg-error "is not a variable" } */
48 #pragma omp p reduction (+:pp) /* { dg-error "user defined reduction not found for" } */
50 #pragma omp p reduction (*:s) /* { dg-error "user defined reduction not found for" } */
52 #pragma omp p reduction (-:a)
55 #pragma omp p reduction (*:d)
57 #pragma omp p reduction (|:d) /* { dg-error "has invalid type for" } */
59 #pragma omp p reduction (&&:d) /* { dg-error "has invalid type for" } */
61 #pragma omp p copyin (d) /* { dg-error "must be 'threadprivate'" } */
63 #pragma omp p copyin (x) /* { dg-error "must be 'threadprivate'" } */
65 #pragma omp p for firstprivate (x) lastprivate (x)
66 for (i
= 0; i
< 10; i
++)
68 #pragma omp p private (q) /* { dg-error "incomplete type" } */
70 #pragma omp p firstprivate (q) /* { dg-error "incomplete type" } */
72 #pragma omp p for lastprivate (q) /* { dg-error "incomplete type" } */
73 for (i
= 0; i
< 10; i
++)
75 #pragma omp p shared (t) /* { dg-error "predetermined 'threadprivate'" } */
77 #pragma omp p private (t) /* { dg-error "predetermined 'threadprivate'" } */
79 #pragma omp p firstprivate (t) /* { dg-error "predetermined 'threadpriv" } */
81 #pragma omp p for lastprivate (t) /* { dg-error "predetermined 'threadpr" } */
82 for (i
= 0; i
< 10; i
++)
84 #pragma omp p reduction (*:t) /* { dg-error "predetermined 'threadprivate" } */
86 #pragma omp p for linear (t) /* { dg-error "predetermined 'threadprivate" } */
87 for (i
= 0; i
< 10; i
++)
89 #pragma omp p shared (c) /* { dg-error "predetermined 'shared'" } */
91 #pragma omp p private (c) /* { dg-error "predetermined 'shared'" } */
93 #pragma omp p firstprivate (c)
95 #pragma omp p for lastprivate (c) /* { dg-error "predetermined 'shared'" } */
96 for (i
= 0; i
< 10; i
++)
98 #pragma omp p reduction (*:c) /* { dg-error "predetermined 'shared'" } */
100 #pragma omp p for linear (c) /* { dg-error "predetermined 'shared'" } */
101 for (i
= 0; i
< 10; i
++)