summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/bdv_module3_main.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/bdv_module3_main.C')
-rw-r--r--libgomp/testsuite/libgomp.c++/bdv_module3_main.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/bdv_module3_main.C b/libgomp/testsuite/libgomp.c++/bdv_module3_main.C
new file mode 100644
index 00000000000..08d9279471a
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/bdv_module3_main.C
@@ -0,0 +1,25 @@
+// { dg-skip-if "" { *-*-* } }
+// Built with bdv_module3.C
+
+import bdv_module3;
+
+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 ();
+ }
+ #pragma omp parallel if(0)
+ {
+ if (test () != 1)
+ __builtin_abort ();
+ }
+}