summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/bdv_module2_main.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/bdv_module2_main.C')
-rw-r--r--libgomp/testsuite/libgomp.c++/bdv_module2_main.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/bdv_module2_main.C b/libgomp/testsuite/libgomp.c++/bdv_module2_main.C
new file mode 100644
index 00000000000..e3909f04e44
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/bdv_module2_main.C
@@ -0,0 +1,20 @@
+// { dg-skip-if "" { *-*-* } }
+// Built with bdv_module2.C
+
+import bdv_module2;
+
+int
+main ()
+{
+ // Calls to test from doit() should invoke the omp teams variant
+ // present in the TU where it is defined.
+ doit ();
+ // Calls to test from here shouldn't.
+ if (test () != 0)
+ __builtin_abort ();
+ #pragma omp teams
+ {
+ if (test () != 0)
+ __builtin_abort ();
+ }
+}