summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/sections-2.C
blob: aabdfaf8069aef31c2c0eda8f23c02c04ad1fe03 (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
/* { dg-do compile } */

extern void bar(int);
void foo(void)
{
  #pragma omp sections
    bar (0);		// { dg-error "expected" }

  #pragma omp sections
    {
    }			// { dg-error "expected" }

  #pragma omp sections
    {
      bar (1);
    }

  #pragma omp sections
    {
    #pragma omp section
      bar(2);
      bar(3);		// { dg-error "expected" }
      bar(4);
    #pragma omp section
      bar(5);
      bar(6);		// { dg-error "expected" }
      bar(7);
    }
}