1/* { dg-do compile } */
2
3void f1(void)
4{
5  #pragma omp barrier a		/* { dg-error "expected end of line" } */
6}
7
8/* OpenMP 2.5, section 2.7.3:
9
10   Note that because the barrier construct does not have a C language
11   statement as part of its syntax, there are some restrictions on its
12   placement within a program. The barrier directive may only be placed
13   in the program at a position where ignoring or deleting the directive
14   would result in a program with correct syntax.  */
15
16void f2(void)
17{
18  label:       /* { dg-error "label at end of compound statement" } */
19    #pragma omp barrier
20}
21
22void f3(_Bool p)
23{
24  if (p)
25    #pragma omp barrier		/* { dg-error "compound statements" } */
26}
27