Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/declare-pr94120.c

raw
1 /* { dg-do compile } */
2
3 /* PR middle-end/94120 */
4
5 void foo()
6 {
7 int foo;
8 {
9 #pragma acc declare copy(foo) /* { dg-error "'foo' must be a variable declared in the same scope as '#pragma acc declare'" } */
10 }
11 }
12
13 void
14 f_data (void)
15 {
16 int B[10];
17 #pragma acc data
18 {
19 # pragma acc declare copy(B) /* { dg-error "'B' must be a variable declared in the same scope as '#pragma acc declare'" } */
20 for (int i = 0; i < 10; i++)
21 B[i] = -i;
22 }
23 }