mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-23 10:31:22 +00:00
20 lines
490 B
C
20 lines
490 B
C
/* { dg-do link } */
|
|
/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target offload_device_nonshared_as } } */
|
|
|
|
int var; /* { dg-error "variable 'var' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target offload_device_nonshared_as } } */
|
|
|
|
#pragma omp declare target
|
|
void __attribute__((noinline, noclone))
|
|
foo (void)
|
|
{
|
|
var++;
|
|
}
|
|
#pragma omp end declare target
|
|
|
|
int
|
|
main ()
|
|
{
|
|
#pragma omp target
|
|
foo ();
|
|
}
|