summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/block-0.C
blob: fa7865d8b93cd1ee54bff983ea841e0e246aef59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-omplower" }

void bar();
void foo()
{
  #pragma omp critical
    bar ();
  #pragma omp master
    bar ();
  #pragma omp single
    bar ();
  #pragma omp for
  for (int i = 0; i < 10; ++i)
    bar ();
  #pragma omp sections
    { bar(); }
  #pragma omp parallel
    bar ();
  #pragma omp parallel for
  for (int i = 0; i < 10; ++i)
    bar ();
  #pragma omp parallel sections
    {
      bar ();
      bar ();
    #pragma omp section
      bar ();
    }
}

// { dg-final { scan-tree-dump-times "terminate" 10 "omplower" } }
// { dg-final { cleanup-tree-dump "omplower" } }