Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/variable-not-offloaded.c

18 lines
255 B
C
Raw Normal View History

2019-06-02 15:48:37 +00:00
/* { dg-do link } */
int var; /* { dg-error "'var' requires a 'declare' directive for use in a 'routine' function" } */
#pragma acc routine
void __attribute__((noinline, noclone))
foo (void)
{
var++;
}
int
main ()
{
#pragma acc parallel
foo ();
}