summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/goto1.C
blob: 0dcc8bc00240960cb950f70dff40f915e1347e00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
// Origin: Mark Mitchell <mark@codesourcery.com>

struct S
{
  S ();
  ~S ();
};

void f ()
{
  {
    S s1; // { dg-error "" } skips initialization
  
  t:	  // { dg-error "" } jump to label
    S s2;
    ;
  }

  goto t; // { dg-error "" } from here
}