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