diff --git a/compiler/passes/parallel.cpp b/compiler/passes/parallel.cpp index 8016b9b611f7..d9f191c058d3 100644 --- a/compiler/passes/parallel.cpp +++ b/compiler/passes/parallel.cpp @@ -1145,6 +1145,12 @@ makeHeapAllocations() { call->getStmtExpr()->insertBefore(new DefExpr(tmp)); call->getStmtExpr()->insertBefore(new CallExpr(PRIM_MOVE, tmp, new CallExpr(PRIM_GET_MEMBER_VALUE, use->symbol(), heapType->getField(1)))); use->replace(new SymExpr(tmp)); + if (call->isPrimitive(PRIM_ZERO_VARIABLE)) { + // aftering zeroing the value, we need to set it back + // otherwise its a dead store + call->getStmtExpr()->insertAfter( + new CallExpr(PRIM_SET_MEMBER, use->symbol(), heapType->getField(1), tmp)); + } } } else if (use->parentExpr) INT_FATAL(var, "unexpected case"); diff --git a/test/extern/ferguson/NUMLOCALES b/test/extern/ferguson/NUMLOCALES new file mode 100644 index 000000000000..0cfbf08886fc --- /dev/null +++ b/test/extern/ferguson/NUMLOCALES @@ -0,0 +1 @@ +2