This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix overloaded <> when the peephole optimiser is disabled.
[perl5.git] / pp.h
diff --git a/pp.h b/pp.h
index 5cde92b..0ba877f 100644 (file)
--- a/pp.h
+++ b/pp.h
@@ -448,8 +448,12 @@ Does not use C<TARG>.  See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
            SETTARG;                                            \
            PUTBACK;                                            \
            if (jump) {                                         \
+               OP *jump_o = NORMAL->op_next;                   \
+               while (jump_o->op_type == OP_NULL)              \
+                   jump_o = jump_o->op_next;                   \
+               assert(jump_o->op_type == OP_ENTERSUB);         \
                PL_markstack_ptr--;                             \
-               return NORMAL->op_next->op_next;                \
+               return jump_o->op_next;                         \
            }                                                   \
            return NORMAL;                                      \
        }                                                       \