summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2012-10-24 14:01:01 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2012-10-30 10:26:25 +0100
commit287127a9ff31adbada4945a2e82cd4ab57786b85 (patch)
treefb25deabb7261d769832324830696f8090e3abca
parent2b00a7d26f358dcec7882fe3c4c457abae0a0739 (diff)
Process the inner statement of a case label, even if the case range is empty.
The inner statement might be reachable by other (case) labels.
-rw-r--r--ast2firm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ast2firm.c b/ast2firm.c
index dd17645..c1efc37 100644
--- a/ast2firm.c
+++ b/ast2firm.c
@@ -4745,10 +4745,7 @@ static ir_node *switch_statement_to_firm(switch_statement_t *statement)
static ir_node *case_label_to_firm(const case_label_statement_t *statement)
{
- if (statement->is_empty_range)
- return NULL;
-
- if (current_switch != NULL) {
+ if (current_switch != NULL && !statement->is_empty_range) {
ir_node *block = new_immBlock();
/* Fallthrough from previous case */
jump_if_reachable(block);