gcc/testsuite/c-c++-common/goacc/pr69916.c
raw| 1 | /* { dg-additional-options "-O2" } */ |
| 2 | |
| 3 | /* PR 69916, an loop determined to be empty sometime after omp-lower |
| 4 | and before oacc-device-lower can evaporate leading to no GOACC_LOOP |
| 5 | internal functions existing. */ |
| 6 | |
| 7 | int |
| 8 | main (void) |
| 9 | { |
| 10 | |
| 11 | #pragma acc parallel |
| 12 | { |
| 13 | int j = 0; |
| 14 | #pragma acc loop private (j) |
| 15 | for (int i = 0; i < 10; i++) |
| 16 | j++; |
| 17 | } |
| 18 | |
| 19 | return 0; |
| 20 | } |