From 6d1050b1c7c8f5075aaaf6b922ff36f3aceef5e2 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Mon, 27 Jun 2011 16:56:25 -0700 Subject: [PATCH] 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). --- src/comp/middle/tstate/auxiliary.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comp/middle/tstate/auxiliary.rs b/src/comp/middle/tstate/auxiliary.rs index 034a9bd7f7f..13198788141 100644 --- a/src/comp/middle/tstate/auxiliary.rs +++ b/src/comp/middle/tstate/auxiliary.rs @@ -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 { - ret extend_prestate_ann(ccx, id, p) | - extend_poststate_ann(ccx, id, p); + ret set_prestate_ann(ccx, id, p) | + set_poststate_ann(ccx, id, p); } fn num_constraints(fn_info m) -> uint { ret m.num_constraints; }