Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/issue24534.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/issue24534.d(12): Error: `goto` skips declaration of variable `issue24534.f1.y1`
5 fail_compilation/issue24534.d(13): declared here
6 fail_compilation/issue24534.d(20): Error: `goto` skips declaration of variable `issue24534.f2.y2`
7 fail_compilation/issue24534.d(22): declared here
8 ---
9 */
10 void f1(){ //always failed with error about skipping a declaration
11 int x1;
12 goto Label1;
13 int y1;
14 Label1:
15 int z1;
16 }
17
18 void f2(){ //compiled fine before this bug was fixed
19 int x2;
20 goto Label2;
21 Dummy2:
22 int y2;
23 Label2:
24 int z2;
25 }