From: weiyu Date: Thu, 19 Dec 2019 00:05:37 +0000 (-0800) Subject: Bug fix X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2f382c791daa529ed998c35d017703d52ab46d9d;p=c11tester.git Bug fix --- diff --git a/funcnode.cc b/funcnode.cc index 26e8f59e..49a3c01d 100644 --- a/funcnode.cc +++ b/funcnode.cc @@ -554,10 +554,16 @@ SnapVector * half_pred_expressions) bool FuncNode::amend_predicate_expr(Predicate * curr_pred, FuncInst * next_inst, ModelAction * next_act) { ModelVector * children = curr_pred->get_children(); - ASSERT(children->size() == 1); - // there should only be only child - Predicate * unset_pred = (*children)[0]; + Predicate * unset_pred = NULL; + for (uint i = 0; i < children->size(); i++) { + Predicate * child = (*children)[i]; + if (child->get_func_inst() == next_inst) { + unset_pred = child; + break; + } + } + uint64_t read_val = next_act->get_reads_from_value(); // only generate NULLITY predicate when it is actually NULL.