Commit 1d42067c authored by Jeroen Meijer's avatar Jeroen Meijer Committed by Alfons Laarman

Fix correctly mark index in an array as read instead

parent 67b6d203
...@@ -473,7 +473,13 @@ void dve_compiler::analyse_expression( dve_expression_t & expr, ext_transition_t ...@@ -473,7 +473,13 @@ void dve_compiler::analyse_expression( dve_expression_t & expr, ext_transition_t
} else { } else {
// some expression, mark all & continue analysis // some expression, mark all & continue analysis
mark_dependency(expr.get_ident_gid(), state_creator_t::VARIABLE, -1, dep); mark_dependency(expr.get_ident_gid(), state_creator_t::VARIABLE, -1, dep);
analyse_expression(*expr.left(), ext_transition, dep); if ((*expr.left()).get_operator() == T_ASSIGNMENT) {
analyse_expression(*expr.left(), ext_transition, ext_transition.sv_write);
} else if (dep == ext_transition.sv_write) {
analyse_expression(*expr.left(), ext_transition, ext_transition.sv_read);
} else {
analyse_expression(*expr.left(), ext_transition, dep);
}
} }
break; break;
case T_LT: case T_LEQ: case T_EQ: case T_NEQ: case T_GT: case T_GEQ: case T_LT: case T_LEQ: case T_EQ: case T_NEQ: case T_GT: case T_GEQ:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment