SvUTF8_off(TARG); /* decontaminate */
if (SP - MARK > 1)
do_join(TARG, &PL_sv_no, MARK, SP);
- else
+ else {
sv_setsv(TARG, (SP > MARK)
? *SP
: (padoff_du = find_rundefsvoffset(),
(padoff_du == NOT_IN_PAD
|| PAD_COMPNAME_FLAGS_isOUR(padoff_du))
? DEFSV : PAD_SVl(padoff_du)));
+
+ if (! SvOK(TARG) && ckWARN(WARN_UNINITIALIZED))
+ report_uninit(TARG);
+ }
+
up = SvPV_force(TARG, len);
if (len > 1) {
if (DO_UTF8(TARG)) { /* first reverse each character */
EXPECT
Use of uninitialized value $undef in addition (+) at - line 4.
Use of uninitialized value $undef in addition (+) at - line 7.
+########
+use warnings 'uninitialized';
+my ($r1, $r2);
+$_ = undef;
+$v = reverse;
+$v = reverse $r1;
+$v = reverse "abc", $r2, "def";
+EXPECT
+Use of uninitialized value in reverse at - line 4.
+Use of uninitialized value $r1 in reverse at - line 5.
+Use of uninitialized value $r2 in reverse at - line 6.