Skip to content

Commit

Permalink
fix a bug in selecting union arrays
Browse files Browse the repository at this point in the history
this fixes the generation time crash seen for seed 295164083
  • Loading branch information
Xuejun Yang committed Jun 25, 2011
1 parent 25075ea commit df982fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ReducerOutputMgr.cpp
Expand Up @@ -605,7 +605,7 @@ ReducerOutputMgr::output_reduced_stm(const Statement* stm, std::ostream &out, in
// insert printing value for focus variable
if (stm->eType == eReturn) {
// output value(s) of monitor variable(s) before return
if (reducer->dump_monitored_var && stm->func->feffect.is_written(reducer->monitored_var)) {
if (reducer->dump_monitored_var && stm->func->feffect.is_written_partially(reducer->monitored_var)) {
output_tab(out, indent);
string vname = reducer->monitored_var->name;
out <<"printf(\" " << vname << " = %d\", " << vname <<");";
Expand Down
2 changes: 1 addition & 1 deletion src/VariableSelector.cpp
Expand Up @@ -1315,7 +1315,7 @@ VariableSelector::select_array(const CGContext &cg_context)
assert(av);
if (av->collective == 0) {
if (!cg_context.get_effect_context().is_read_partially(av) &&
!cg_context.get_effect_context().is_written(av) &&
!cg_context.get_effect_context().is_written_partially(av) &&
(cg_context.get_effect_context().is_side_effect_free() || !av->is_volatile()) &&
!av->is_const() &&
!cg_context.is_nonwritable(av) &&
Expand Down

0 comments on commit df982fb

Please sign in to comment.