GvIOn() already performs the checks and produces a nice error message,
and similar functions, such as open() and socket(), don't have
assertions on this condition.
t/lib/croak/pp Test croak calls from pp.c
t/lib/croak/pp_ctl Test croak calls from pp_ctl.c
t/lib/croak/pp_hot Test croak calls from pp_hot.c
+t/lib/croak/pp_sys Test croak calls from pp_sys.c
t/lib/croak.t Test calls to Perl_croak() in the C source.
t/lib/croak/toke Test croak calls from toke.c
t/lib/cygwin.t Builtin cygwin function tests
GV * const wgv = MUTABLE_GV(POPs);
GV * const rgv = MUTABLE_GV(POPs);
- assert (isGV_with_GP(rgv));
- assert (isGV_with_GP(wgv));
rstio = GvIOn(rgv);
if (IoIFP(rstio))
do_close(rgv, FALSE);
--- /dev/null
+__END__
+# pp_sys.c
+# NAME pipe() croaks on bad left side [perl #126480]
+# SKIP ? use Config; !$Config{d_pipe} && "No pipe() available"
+my $fh;
+pipe($$5, $fh)
+EXPECT
+Bad symbol for filehandle at - line 3.
+########
+# NAME pipe() croaks on bad right side [perl #126480]
+# SKIP ? use Config; !$Config{d_pipe} && "No pipe() available"
+my $fh;
+pipe($fh, $$5)
+EXPECT
+Bad symbol for filehandle at - line 2.
+########