Currently an unreachable switch statement is simply discarded. Thus, if the statement contains some (reachable) labels, the branches to these labels correspond to branches to non-existing BBs. The object of this series is fix the linearization of such switches. This series is available for review & testing in the Git repository at: git://github.com/lucvoo/sparse-dev.git dead-switch ---------------------------------------------------------------- Luc Van Oostenryck (3): add tescase for unreachable label in switch ir-validate: add validation branch to dead BB fix linearization of unreachable switch (with reachable label). ir.c | 37 +++++++++++++++++++++++++++++++--- linearize.c | 11 +++++----- linearize.h | 6 ++++++ validation/linear/unreachable-label0.c | 19 +++++++++++++++++ 4 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 validation/linear/unreachable-label0.c