summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/ordered-1.C
blob: a1cd7f486028d190698de65cc27be78b8b2bb3c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-omplower" } */

extern void bar(int);

void foo (void)
{
  #pragma omp ordered
    bar(0);

  #pragma omp ordered
  {
    bar(1);
    bar(2);
  }
}

/* { dg-final { scan-tree-dump-times "GOMP_ordered_start" 2 "omplower" } } */
/* { dg-final { scan-tree-dump-times "GOMP_ordered_end" 2 "omplower" } } */
/* { dg-final { cleanup-tree-dump "omplower" } } */