Process the inner statement of a case label, even if the case range is empty.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 24 Oct 2012 12:01:01 +0000 (14:01 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 30 Oct 2012 09:26:25 +0000 (10:26 +0100)
The inner statement might be reachable by other (case) labels.

ast2firm.c

index dd17645..c1efc37 100644 (file)
@@ -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);