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

Fix correctly mark index in an array as read instead

parent 67b6d203
......@@ -473,8 +473,14 @@ void dve_compiler::analyse_expression( dve_expression_t & expr, ext_transition_t
} else {
// some expression, mark all & continue analysis
mark_dependency(expr.get_ident_gid(), state_creator_t::VARIABLE, -1, 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);
case T_LT: case T_LEQ: case T_EQ: case T_NEQ: case T_GT: case T_GEQ:
case T_PLUS: case T_MINUS: case T_MULT: case T_DIV: case T_MOD:
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