This fixes RT #59734 : Segfault when using (?|) in regexp.
/* Pick up the branches, linking them together. */
parse_start = RExC_parse; /* MJD */
br = regbranch(pRExC_state, &flags, 1,depth+1);
+
+ if (freeze_paren) {
+ if (RExC_npar > after_freeze)
+ after_freeze = RExC_npar;
+ RExC_npar = freeze_paren;
+ }
+
/* branch_len = (paren != 0); */
if (br == NULL)
(?|(?|(a)|(b))|(?|(c)|(d))) d y $1 d
(.)(?|(.)(.)x|(.)d)(.) abcde y $1-$2-$3-$4-$5- b-c--e--
(\N)(?|(\N)(\N)x|(\N)d)(\N) abcde y $1-$2-$3-$4-$5- b-c--e--
+(?|(?<foo>x)) x y $+{foo} x
+(?|(?<foo>x)|(?<bar>y)) x y $+{foo} x
+(?|(?<bar>y)|(?<foo>x)) x y $+{foo} x
+(?<bar>)(?|(?<foo>x)) x y $+{foo} x
+
#Bug #41492
(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A) a y $& a
(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A) aa y $& aa