Fix constant propagation for repeat_statement_c class.
--- a/stage3/constant_folding.cc Thu Jan 03 23:16:19 2013 +0100
+++ b/stage3/constant_folding.cc Thu Jan 03 23:39:25 2013 +0100
@@ -1383,13 +1383,14 @@
map_values_t values_incoming;
map_values_t values_statement_result;
+ values_incoming = values; /* save incoming status */
+ symbol->statement_list->accept(*this);
+
/* Optimize dead code */
symbol->expression->accept(*this);
- if (VALID_CVALUE(bool, symbol->expression) && GET_CVALUE(bool, symbol->expression) == false)
+ if (VALID_CVALUE(bool, symbol->expression) && GET_CVALUE(bool, symbol->expression) == true)
return NULL;
- values_incoming = values; /* save incoming status */
- symbol->statement_list->accept(*this);
values_statement_result = values;
values = inner_left_join_values(values_statement_result, values_incoming);