This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
propagate /msix and (?msix) etc flags into (??{})
[perl5.git] / regexec.c
index 878cdfc..41331e7 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -4483,8 +4483,12 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog)
                        /* if we got here, it should be an engine which
                         * supports compiling code blocks and stuff */
                        assert(rex->engine && rex->engine->op_comp);
+                        assert(!(scan->flags & ~RXf_PMf_COMPILETIME));
                        re_sv = rex->engine->op_comp(aTHX_ &ret, 1, NULL,
-                                   rex->engine, NULL, NULL, 0, pm_flags);
+                                   rex->engine, NULL, NULL,
+                                    /* copy /msix etc to inner pattern */
+                                    scan->flags,
+                                    pm_flags);
 
                        if (!(SvFLAGS(ret)
                              & (SVs_TEMP | SVs_PADTMP | SVf_READONLY