OSDN Git Service

2009-07-17 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / gomp / flush-1.C
1 /* { dg-do compile } */
2 /* { dg-options "-fopenmp -fdump-tree-gimple" } */
3
4 void f1(void)
5 {
6   #pragma omp flush
7 }
8
9 int x;
10
11 void f2(bool p)
12 {
13   int z;
14   if (p)
15     {
16       #pragma omp flush (x)
17     }
18   else
19     {
20       #pragma omp flush (x, z, p)
21     }
22 }
23
24 /* { dg-final { scan-tree-dump-times "__sync_synchronize" 3 "gimple" } } */
25 /* { dg-final { cleanup-tree-dump "gimple" } } */