1 /* Test the output of "-fopt-info-optimized-omp".  */
2 
3 /* { dg-additional-options "-fopt-info-optimized-omp" } */
4 
5 /* See also "../../gfortran.dg/goacc/note-parallelism.f90".  */
6 
7 int
main()8 main ()
9 {
10   int x, y, z;
11 
12 #pragma acc parallel
13   for (x = 0; x < 10; x++)
14     ;
15 
16 #pragma acc parallel loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
17   for (x = 0; x < 10; x++)
18     ;
19 
20 #pragma acc parallel loop gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
21   for (x = 0; x < 10; x++)
22     ;
23 
24 #pragma acc parallel loop worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
25   for (x = 0; x < 10; x++)
26     ;
27 
28 #pragma acc parallel loop vector /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
29   for (x = 0; x < 10; x++)
30     ;
31 
32 #pragma acc parallel loop gang vector /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
33   for (x = 0; x < 10; x++)
34     ;
35 
36 #pragma acc parallel loop gang worker /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
37   for (x = 0; x < 10; x++)
38     ;
39 
40 #pragma acc parallel loop worker vector /* { dg-message "optimized: assigned OpenACC worker vector loop parallelism" } */
41   for (x = 0; x < 10; x++)
42     ;
43 
44 #pragma acc parallel loop gang worker vector /* { dg-message "optimized: assigned OpenACC gang worker vector loop parallelism" } */
45   for (x = 0; x < 10; x++)
46     ;
47 
48 #pragma acc parallel loop gang /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
49   for (x = 0; x < 10; x++)
50 #pragma acc loop worker /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
51     for (y = 0; y < 10; y++)
52 #pragma acc loop vector /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
53       for (z = 0; z < 10; z++)
54 	;
55 
56 #pragma acc parallel loop /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
57   for (x = 0; x < 10; x++)
58     ;
59 
60 #pragma acc parallel loop /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
61   for (x = 0; x < 10; x++)
62 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
63     for (y = 0; y < 10; y++)
64       ;
65 
66 #pragma acc parallel loop /* { dg-message "optimized: assigned OpenACC gang loop parallelism" } */
67   for (x = 0; x < 10; x++)
68 #pragma acc loop /* { dg-message "optimized: assigned OpenACC worker loop parallelism" } */
69     for (y = 0; y < 10; y++)
70 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
71       for (z = 0; z < 10; z++)
72 	;
73 
74 #pragma acc parallel
75   for (x = 0; x < 10; x++)
76 #pragma acc loop /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
77     for (y = 0; y < 10; y++)
78 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
79       for (z = 0; z < 10; z++)
80 	;
81 
82 #pragma acc parallel loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
83   for (x = 0; x < 10; x++)
84 #pragma acc loop /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
85     for (y = 0; y < 10; y++)
86 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
87       for (z = 0; z < 10; z++)
88 	;
89 
90 #pragma acc parallel loop /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
91   for (x = 0; x < 10; x++)
92 #pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
93     for (y = 0; y < 10; y++)
94 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
95       for (z = 0; z < 10; z++)
96 	;
97 
98 #pragma acc parallel loop /* { dg-message "optimized: assigned OpenACC gang worker loop parallelism" } */
99   for (x = 0; x < 10; x++)
100 #pragma acc loop /* { dg-message "optimized: assigned OpenACC vector loop parallelism" } */
101     for (y = 0; y < 10; y++)
102 #pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
103       for (z = 0; z < 10; z++)
104 	;
105 
106 #pragma acc parallel loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
107   for (x = 0; x < 10; x++)
108 #pragma acc loop /* { dg-message "optimized: assigned OpenACC gang vector loop parallelism" } */
109     for (y = 0; y < 10; y++)
110 #pragma acc loop seq /* { dg-message "optimized: assigned OpenACC seq loop parallelism" } */
111       for (z = 0; z < 10; z++)
112 	;
113 
114   return 0;
115 }
116