summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 61ec8c211f..bf9825941f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6039,6 +6039,8 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth)
? REFFL
: REFF),
num);
+ if (RExC_nestroot && num >= RExC_nestroot)
+ REGNODE_p(ret)->flags = VOLATILE_REF;
if (OP(REGNODE_p(ret)) == REFF) {
RExC_seen_d_op = TRUE;
}