]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - libgomp/testsuite/libgomp.c/omp-single-3.c
Imported gcc-4.4.3
[msp430-gcc.git] / libgomp / testsuite / libgomp.c / omp-single-3.c
diff --git a/libgomp/testsuite/libgomp.c/omp-single-3.c b/libgomp/testsuite/libgomp.c/omp-single-3.c
new file mode 100644 (file)
index 0000000..5a06532
--- /dev/null
@@ -0,0 +1,21 @@
+extern 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;
+}