Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail4448.d(19): Error: label `L1` has no `break`
5 fail_compilation/fail4448.d(26): called from here: `bug4448()`
6 fail_compilation/fail4448.d(26): while evaluating: `static assert(bug4448() == 3)`
7 ---
8 */
9
10 int bug4448()
11 {
12 int n=2;
13 L1:{ switch(n)
14 {
15 case 5:
16 return 7;
17 default:
18 n = 5;
19 break L1;
20 }
21 int w = 7;
22 }
23 return 3;
24 }
25
26 static assert(bug4448()==3);