develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128643] MinGW.org builds - infnan and pack test failures dueto LD handling

Thread Next
From:
Dan Collins
Date:
July 17, 2016 01:19
Subject:
[perl #128643] MinGW.org builds - infnan and pack test failures dueto LD handling
Message ID:
rt-4.0.18-29649-1468718330-433.128643-75-0@perl.org
# New Ticket Created by  Dan Collins 
# Please include the string:  [perl #128643]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128643 >


Hello,

I have built perl using long doubles with the following Win32 tools:

W:\buildbot\windows1\win32-mingw-ld\build>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.9.3/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-4.9.3/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libstdcxx-debug --with-tune=generic --enable-nls
Thread model: win32
gcc version 4.9.3 (GCC)

W:\buildbot\windows1\win32-mingw-ld\build>perl.exe -Ilib -V
Summary of my perl5 (revision 5 version 25 subversion 3) configuration:

  Platform:
    osname=MSWin32
    osvers=10.0
    archname=MSWin32-x86-multi-thread-ld
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=undef
    use64bitall=undef
    uselongdouble=define
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='4.9.3'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=1234
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=12
    longdblkind=3
    ivtype='long'
    ivsize=4
    nvtype='long double'
    nvsize=12
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"c:\perl\lib\CORE" -L"C:\MinGW\lib"'
    libpth=C:\MinGW\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl525.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"c:\perl\lib\CORE" -L"C:\MinGW\lib"'


Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    PERL_IMPLICIT_CONTEXT
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    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
  Built under MSWin32
  Compiled at Jul 16 2016 20:39:38
  @INC:
    lib
    W:/buildbot/windows1/win32-mingw-ld/build/lib
    .

I have test failures:

# Failed test 310 - 9**9**9 is Inf at op/infnan.t line 249
#      got "1.18973149535723177e+4932"
# expected "Inf"
# Failed test 490 - sin(9**9**9) is NaN at op/infnan.t line 400
#      got "0.866408717194837384"
# expected "NaN"
op/infnan.t ........................................................ 
Failed 2/658 subtests

<SNIP>

op/pack.t .......................................................... 
Failed 2/14712 subtests 
	(less 269 skipped subtests: 14441 okay)
# Failed test 13177 - at op/pack.t line 1420
#      got "173 1.28347651700000004e-045 42 215 173 1.28347651700000004e-045 42 215"
# expected "173 1.283476517e-045 42 215 173 1.283476517e-045 42 215"
# Failed test 13180 - at op/pack.t line 1433
#      got "173 1.28347651700000004e-045 42 215"
# expected "173 1.283476517e-045 42 215"

The first part is caused by long doubles:

W:\buildbot\windows1\win32-mingw-ld\build>..\..\win32-mingw\build\perl.exe -le "print 9**9**9"
Inf
W:\buildbot\windows1\win32-mingw-ld\build>perl.exe -le "print 9**9**9"
1.18973149535723177e+4932

The second part is probably your typical rounding error?

-- 
Respectfully,
Dan Collins


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About