blob: 21b2cc14fc79c62811f137acc6d3ce2565b78ccb [file] [log] [blame]
/* { dg-do compile } */
/* PR middle-end/94120 */
void foo()
{
int foo;
{
#pragma acc declare copy(foo) /* { dg-error "'foo' must be a variable declared in the same scope as '#pragma acc declare'" } */
}
}
void
f_data (void)
{
int B[10];
#pragma acc data
{
# pragma acc declare copy(B) /* { dg-error "'B' must be a variable declared in the same scope as '#pragma acc declare'" } */
for (int i = 0; i < 10; i++)
B[i] = -i;
}
}