summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/block-5.C
blob: 391f8b660a60d8a3e490bd7b84ea29247739ce2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }

void foo()
{
  #pragma omp master
    {
      goto bad1;	// { dg-error "from here" }
    }

  #pragma omp master
    {
    bad1:		// { dg-error "jump|exits OpenMP" }
      return;		// { dg-error "invalid exit" }
    }
}

// { dg-message "error: invalid branch to/from an OpenMP structured block" "" { target *-*-* } 7 }