diff options
Diffstat (limited to 'libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c b/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c new file mode 100644 index 0000000..9e59ef8 --- /dev/null +++ b/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c @@ -0,0 +1,16 @@ +/* { dg-do link } */ +/* { dg-excess-errors "unresolved symbol foo, lto1, mkoffload and lto-wrapper fatal errors" { target offload_device_nonshared_as } } */ +/* { dg-additional-sources "function-not-offloaded-aux.c" } */ + +#pragma omp declare target +int var; +#pragma omp end declare target + +extern void foo (); + +int +main () +{ +#pragma omp target + foo (); +} |