pure_exp should set the state, not extend it

This fixes a bug where de-initializations were getting masked
(and programs that used a variable that had been de-initialized
snuck through).
This commit is contained in:
Tim Chevalier 2011-06-27 16:56:25 -07:00
parent a72481f90b
commit 6d1050b1c7

View file

@ -436,8 +436,8 @@ fn set_postcond_false(&crate_ctxt ccx, node_id id) {
} }
fn pure_exp(&crate_ctxt ccx, node_id id, &prestate p) -> bool { fn pure_exp(&crate_ctxt ccx, node_id id, &prestate p) -> bool {
ret extend_prestate_ann(ccx, id, p) | ret set_prestate_ann(ccx, id, p) |
extend_poststate_ann(ccx, id, p); set_poststate_ann(ccx, id, p);
} }
fn num_constraints(fn_info m) -> uint { ret m.num_constraints; } fn num_constraints(fn_info m) -> uint { ret m.num_constraints; }