gcc/testsuite/g++.dg/goacc/implied-copy.C
raw| 1 | /* { dg-additional-options "-fdump-tree-gimple" } */ |
| 2 | |
| 3 | /* Test for wchar_t type. */ |
| 4 | int |
| 5 | main(void) |
| 6 | { |
| 7 | int i; |
| 8 | wchar_t a[100], s; |
| 9 | |
| 10 | #pragma acc parallel reduction (+:s) |
| 11 | for (i = 0; i < 10; i++) |
| 12 | { |
| 13 | s += a[i]; |
| 14 | } |
| 15 | |
| 16 | #pragma acc serial reduction (+:s) |
| 17 | for (i = 0; i < 10; i++) |
| 18 | { |
| 19 | s += a[i]; |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | /* { dg-final { scan-tree-dump-times "map\\(tofrom:s \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */ |