summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c++/single-3.C
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c++/single-3.C')
-rw-r--r--libgomp/testsuite/libgomp.c++/single-3.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/single-3.C b/libgomp/testsuite/libgomp.c++/single-3.C
new file mode 100644
index 000000000..abc7f44b3
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/single-3.C
@@ -0,0 +1,21 @@
+extern "C" void abort (void);
+
+void
+single (int a, int b)
+{
+ #pragma omp single copyprivate(a) copyprivate(b)
+ {
+ a = b = 5;
+ }
+
+ if (a != b)
+ abort ();
+}
+
+int main()
+{
+ #pragma omp parallel
+ single (1, 2);
+
+ return 0;
+}