Subject: | Test failures with perl-5.21.5, nvtype is (113-bit prec) __float128 |
Hi,
Here's the actual failures in make test:
t/Math-Int64.t .......... 1/?
# Failed test 'max int64 >> 63'
# at t/Math-Int64.t line 175.
# got: '0'
# expected: '1'
# Failed test 'max int64 >>= 63'
# at t/Math-Int64.t line 179.
# got: '0'
# expected: '1'
# Looks like you failed 2 tests of 1139.
t/Math-Int64.t .......... Dubious, test returned 2 (wstat 512, 0x200)
[snip]
t/Math-Int64.t (Wstat: 512 Tests: 1139 Failed: 2)
Failed tests: 1138-1139
Non-zero exit status: 2
The crux of the problem seems to be this:
$ perl -MMath::Int64="int64" -le '$x=int64(9223372036854775807) / 2 ** 63;print $x;'
1
On perl 5.21.5 when nvtype is (64-bit prec) long double, I'm getting the expected:
$ perl -MMath::Int64="int64" -le '$x=int64(9223372036854775807) / 2 ** 63;print $x;'
0
Maybe it's a bug in perl-5.21.5, but I can't trigger anything unusual there if I don't use Math::Int64's int64() function.
Having forced installation of M::I64 onto this __float128 build of 5.21.5, I then get what appears to be related test failures with M::I128:
t/Math-Int128.t ... 1/?
# Failed test 'max int128 >> 127'
# at t/Math-Int128.t line 155.
# got: '0'
# expected: '1'
# Failed test 'max int128 >>= 127'
# at t/Math-Int128.t line 159.
# got: '0'
# expected: '1'
# Looks like you failed 2 tests of 956.
t/Math-Int128.t ... Dubious, test returned 2 (wstat 512, 0x200)
[snip]
t/Math-Int128.t (Wstat: 512 Tests: 956 Failed: 2)
Failed tests: 750-751
Non-zero exit status: 2
Let me know if there's some further testing/investigating that I ought to do.
For completeness, here's the full perl -V:
$ perl -V
Summary of my perl5 (revision 5 version 21 subversion 5) configuration:
Platform:
osname=linux, osvers=3.13.0-37-generic, archname=x86_64-linux-thread-multi-ld
uname='linux sisyphus5-desktop 3.13.0-37-generic #64-ubuntu smp mon sep 22 21:28:38 utc 2014 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Duse64bitint -Duse64bitall -Dusethreads -Dusequadmath -Dusedevel -Dprefix=/home/sisyphus/bleadperl'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
use64bitint=define, use64bitall=define, uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.8.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=1
ivtype='long', ivsize=8, nvtype='__float128', nvsize=16, Off_t='off_t', lseeksize=8
alignbytes=16, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lquadmath
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lquadmath
libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.19'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_LOCALE
USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_LONG_DOUBLE
USE_PERLIO USE_PERL_ATOF USE_QUADMATH
USE_REENTRANT_API
Built under linux
Compiled at Oct 21 2014 15:11:03
@INC:
/home/sisyphus/bleadperl/lib/site_perl/5.21.5/x86_64-linux-thread-multi-ld
/home/sisyphus/bleadperl/lib/site_perl/5.21.5
/home/sisyphus/bleadperl/lib/5.21.5/x86_64-linux-thread-multi-ld
/home/sisyphus/bleadperl/lib/5.21.5
/home/sisyphus/bleadperl/lib/site_perl
.
Cheers,
Rob