Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c
Wolfgang Thaller 6fbf4226da gcc-9.1
2019-06-20 20:10:10 +02:00

19 lines
466 B
C

/* { dg-do link } */
/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_selected } } */
int var;
#pragma acc declare create (var)
void __attribute__((noinline, noclone))
foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_selected } } */
{
var++;
}
int
main ()
{
#pragma acc parallel
foo ();
}