aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c-c++-common/function-not-offloaded.c
diff options
context:
space:
mode:
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.c16
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 00000000000..9e59ef8864e
--- /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 ();
+}