1 /* PR middle-end/27415 */
2 /* { dg-do compile } */
3 
4 void
test1(void)5 test1 (void)
6 {
7   int i = 0;
8 #pragma omp parallel
9 #pragma omp for firstprivate (i)		/* { dg-error "should not be firstprivate" } */
10   for (i = 0; i < 10; i++)
11     ;
12 }
13 
14 void
test2(void)15 test2 (void)
16 {
17   int i = 0;
18 #pragma omp parallel for firstprivate (i)	/* { dg-error "should not be firstprivate" } */
19   for (i = 0; i < 10; i++)
20     ;
21 }
22 
23 void
test3(void)24 test3 (void)
25 {
26   int i = 0;
27 #pragma omp parallel
28 #pragma omp for reduction (+:i)			/* { dg-error "should not be reduction" } */
29   for (i = 0; i < 10; i++)
30     ;
31 }
32 
33 void
test4(void)34 test4 (void)
35 {
36   int i = 0;
37 #pragma omp parallel for reduction (*:i)	/* { dg-error "should not be reduction" } */
38   for (i = 0; i < 10; i++)
39     ;
40 }
41 
42 void
test5(void)43 test5 (void)
44 {
45   int i = 0;
46 #pragma omp parallel firstprivate (i)
47 #pragma omp for
48   for (i = 0; i < 10; i++)
49     ;
50 }
51