or more exactly, an unreachable switch statement but containing a reachable label. This is valid code but is curently wrongly linearized. So, add a testcase for it. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- validation/linear/unreachable-label0.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 validation/linear/unreachable-label0.c diff --git a/validation/linear/unreachable-label0.c b/validation/linear/unreachable-label0.c new file mode 100644 index 000000000..568ae588a --- /dev/null +++ b/validation/linear/unreachable-label0.c @@ -0,0 +1,20 @@ +static int foo(int a) +{ + goto label; + switch(a) { + default: +label: + break; + } + return 0; +} + +/* + * check-name: unreachable-label0 + * check-command: test-linearize $file + * check-known-to-fail + * + * check-output-ignore + * check-output-contains: ret\\. + * check-output-excludes: END + */ -- 2.18.0