MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / switch_skip.d
blob7141fb16ba82e09655977a51b47bc8da8061ec62
1 /*
2 REQUIRED_ARGS: -verrors=context
3 TEST_OUTPUT:
4 ---
5 fail_compilation/switch_skip.d(22): Error: `switch` skips declaration of variable `switch_skip.test3.j`
6 switch (i)
8 fail_compilation/switch_skip.d(26): declared here
9 int j;
11 fail_compilation/switch_skip.d(39): Error: `switch` skips declaration of variable `switch_skip.test.z`
12 final switch(n)
14 fail_compilation/switch_skip.d(41): declared here
15 int z = 5;
17 ---
20 void test3(int i)
22 switch (i)
24 case 1:
26 int j;
27 case 2:
28 ++j;
29 break;
31 default:
32 break;
36 // https://issues.dlang.org/show_bug.cgi?id=18858
37 int test(int n)
39 final switch(n)
41 int z = 5;
42 enum e = 6;
44 case 1:
45 int y = 2;
46 return y;