summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/goto2.C
blob: 3f4ecc04cf9a65c650fbaaa7765e13a025f3b688 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/20721

bool f();
void g(int i)
{
  if (i) goto bad; // { dg-error "from" }
  bool a = f(); // { dg-error "initialization" }
 bad: // { dg-error "jump" }
  ;
}