summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/flush-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/flush-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/flush-1.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/flush-1.c b/gcc/testsuite/gcc.dg/gomp/flush-1.c
new file mode 100644
index 000000000..d1a4d4a5b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/flush-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fdump-tree-gimple" } */
+
+void f1(void)
+{
+ #pragma omp flush
+}
+
+int x, y, z;
+
+void f2(_Bool p)
+{
+ if (p)
+ {
+ #pragma omp flush (x)
+ }
+ else
+ {
+ #pragma omp flush (x, y, z)
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "__sync_synchronize" 3 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */