Most integers are small, so in most cases it won't be set.
The other option would be to always clear it, but that increases the
amount of inline code for a rare case.
STMT_START { \
IV TARGi_iv = i; \
if (LIKELY( \
- ((SvFLAGS(TARG) & (SVTYPEMASK|SVf_THINKFIRST)) == SVt_IV) \
+ ((SvFLAGS(TARG) & (SVTYPEMASK|SVf_THINKFIRST|SVf_IVisUV)) == SVt_IV) \
& (do_taint ? !TAINT_get : 1))) \
{ \
/* Cheap SvIOK_only(). \
STMT_START { \
UV TARGu_uv = u; \
if (LIKELY( \
- ((SvFLAGS(TARG) & (SVTYPEMASK|SVf_THINKFIRST)) == SVt_IV) \
+ ((SvFLAGS(TARG) & (SVTYPEMASK|SVf_THINKFIRST|SVf_IVisUV)) == SVt_IV) \
& (do_taint ? !TAINT_get : 1) \
& (TARGu_uv <= (UV)IV_MAX))) \
{ \
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
+ require Config;
}
-plan 15;
+plan 17;
# compile time evaluation
$y = 279964589018079;
$y = int($y/59);
cmp_ok($y, '==', 4745162525730, 'run time divison, result of about 42 bits');
+
+SKIP:
+{ # see #126635
+ my $large;
+ $large = eval "0xffff_ffff" if $Config::Config{ivsize} == 4;
+ $large = eval "0xffff_ffff_ffff_ffff" if $Config::Config{ivsize} == 8;
+ $large or skip "Unusual ivsize", 1;
+ for my $x ($large, -1) {
+ cmp_ok($x, "==", int($x), "check $x == int($x)");
+ }
+}