fglock / Perlito

"Perlito" Perl programming language compiler
http://fglock.github.io/Perlito/
Other
414 stars 47 forks source link

Tests fail on perl built with -Duselongdouble #48

Closed Tux closed 7 years ago

Tux commented 7 years ago
Perlito5-9.022-0 $ prove -vwb t/number_string.t
:
ok 14 - start with 0 + noise
not ok 15 - overflow to Inf
:
ok 16 - malformed exponent
ok 17 - malformed exponent
Argument "1acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 21.
Argument "67000acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 23.
Argument "0acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 25.
Argument "1.5acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 28.
Argument "-1acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 30.
Argument "-1.5acmfd" isn't numeric in numeric ne (!=) at t/number_string.t line 32.
Argument "033e4-1652-4" isn't numeric in numeric ne (!=) at t/number_string.t line 38.
Argument "033e4054-1652-4" isn't numeric in numeric ne (!=) at t/number_string.t line 41.
Argument "547137e" isn't numeric in numeric ne (!=) at t/number_string.t line 44.
Argument "547137e-x" isn't numeric in numeric ne (!=) at t/number_string.t line 46.
Failed 1/17 subtests

Test Summary Report
-------------------
t/number_string.t (Wstat: 0 Tests: 17 Failed: 1)
  Failed test:  15
Files=1, Tests=17,  0 wallclock secs ( 0.03 usr +  0.00 sys =  0.03 CPU)
Result: FAIL

I fixed that by adding a 9

print "not " if "033e40549-1652-4" != "Inf";
say  "ok 15 - overflow to Inf";

PASS

Summary of my perl5 (revision 5 version 24 subversion 1) configuration:

  Platform:
    osname=linux, osvers=4.4.49-16-default, archname=x86_64-linux-thread-multi-ld
    uname='linux tux 4.4.49-16-default #1 smp sun feb 19 17:40:35 utc 2017 (70e9954) x86_64 x86_64 x86_64 gnulinux '
    config_args='-Duse64bitall -Duselongdouble -Dusethreads -Duseithreads -Dinc_version_list=none -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='ccache cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
    ccversion='', gccversion='4.8.5', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
    alignbytes=16, prototype=define
  Linker and Libraries:
    ld='ccache cc', ldflags ='-L/pro/local/lib -fstack-protector'
    libpth=/usr/local/lib /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/lib /usr/lib /pro/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.22.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.22'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/pro/local/lib -fstack-protector'

Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV 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_REENTRANT_API
  Built under linux
  Compiled at Mar 14 2017 17:03:50
  @INC:
    /pro/lib/perl5/site_perl/5.24.1/x86_64-linux-thread-multi-ld
    /pro/lib/perl5/site_perl/5.24.1
    /pro/lib/perl5/5.24.1/x86_64-linux-thread-multi-ld
    /pro/lib/perl5/5.24.1
    .
fglock commented 7 years ago

thanks! fixed in 634e3d276ed6726ca4c649cd0a96c32235b45d87