# HG changeset patch # User Manuele Conti # Date 1357252765 -3600 # Node ID a722594dcd643b8f92937f83ac5fdd1a9b16e3f0 # Parent 861e92dc879b06d3e2c593120e72e192596c1e0d Fix constant propagation for repeat_statement_c class. diff -r 861e92dc879b -r a722594dcd64 stage3/constant_folding.cc --- 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);