summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/label7.C
blob: e92dccf5df5a2fd190dda2b514829bb4e4b93dd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/32121
// { dg-do compile }

int f (void)
{
  a:;
  __label__ a;	// { dg-error "not at the beginning" }
  int b;
  __label__ c;	// { dg-error "not at the beginning" }
  a:;		// { dg-error "duplicate label" }
  c:;
}