[win32] reverse integrate mainline
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 2d9706b..c86880c 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3739,8 +3739,10 @@ newSVREF(OP *o)
        o->op_ppaddr = ppaddr[OP_PADSV];
        return o;
     }
-    else if (o->op_type == OP_THREADSV)
+    else if (o->op_type == OP_THREADSV && !(o->op_flags & OPpDONE_SVREF)) {
+       o->op_flags |= OPpDONE_SVREF;
        return o;
+    }
     return newUNOP(OP_RV2SV, 0, scalar(o));
 }