Open p5pRT opened 9 years ago
Intel C is failing a test in opbasic/arith.t. Specifically perl -e" my $num = 2.2250738585072014e-308; print $num" is different on Intel C vs Visual C 2008. Same git commit level for both. I stepped do_ncmp ------------------------------- my $num = 2.2250738585072014e-308; try $T++\, ((study $num)\,($num != 0.0))\, 'min double'; --------------------------------
and found "2.2250738585072014e-308" is NV 0.0 in $num. Not sure what to debug next or where perl converts Perl source code FPs constants to machine NVs. This is the only math related test that fails on my Intel C build and the only one that fails on Intel C and not an identical VC 2008 build.
Console dumps below.
C:\p521\srcnew\t>perl -I..\lib opbasic/arith.t 1..181 ok 1 - modulo: positive positive ok 2 - modulo: negative positive ok 3 - modulo: positive negative ok 4 - modulo: negative negative ok 5 - abs(): 0 0 ok 6 - abs(): 1 1 ok 7 - abs(): -1 1 ok 8 - abs(): 2**31-1: pos pos ok 9 - abs(): 2**31-1: neg pos ok 10 - abs(): 2**32-1: pos pos ok 11 - abs(): 2**32-1: neg pos ok 12 - abs(): 2**63-1: pos pos ok 13 - abs(): 2**63-1: neg pos ok 14 - abs(): 1e50: pos pos ok 15 - abs(): 1e50: neg pos ok 16 - abs() for floating point ok 17 - abs() for floating point ok 18 - abs() for floating point ok 19 - abs() for floating point ok 20 - UV behaves properly: modulo ok 21 - UV behaves properly: modulo ok 22 - UV behaves properly: modulo ok 23 - UV behaves properly: modulo ok 24 - trigger wrapping on 32 bit IVs and UVs ok 25 - IV + IV promotes to UV ok 26 - IV + IV promotes to UV ok 27 - IV + IV promotes to UV ok 28 - IV + UV promotes to NV ok 29 - UV + IV promotes to NV ok 30 - UV + UV promotes to NV ok 31 - UV + IV promotes to IV ok 32 - UV + IV promotes to IV ok 33 - IV + UV promotes to IV ok 34 - IV + UV promotes to IV ok 35 - IV + IV promotes to NV ok 36 - IV + IV promotes to NV ok 37 - addition of 2 positive integers ok 38 - addition of positive and negative integer ok 39 - addition of negative and positive integer ok 40 - addition of 2 negative integers ok 41 - addition of signed negative and positive integers ok 42 - addition of positive and negative integer ok 43 - addition which sums to 0 ok 44 - addition which sums to 0 ok 45 - addition of signed negative and positive integers ok 46 - addition of signed positive and negative integers ok 47 - subtraction of two positive integers ok 48 - subtraction of two positive integers: minuend smaller ok 49 - subtraction of positive and negative integer ok 50 - subtraction of negative and positive integer ok 51 - subtraction of two negative integers ok 52 - subtraction of two negative integers: minuend smaller ok 53 - subtraction of two negative integers with result of 0 ok 54 - subtraction of two positive integers with result of 0 ok 55 - subtraction from large integer ok 56 - subtraction from large integer ok 57 - subtraction from large negative integer ok 58 - subtraction of large negative integer from 0 ok 59 - subtraction of large negative integer from negative integer ok 60 - subtraction of large negative integer from positive integer ok 61 - subtraction from large integer ok 62 - subtraction from large negative integer ok 63 - IV - IV promote to UV ok 64 - IV - IV promote to UV ok 65 - UV - IV promote to NV ok 66 - IV - IV promote to NV ok 67 - UV - UV promote to IV ok 68 - IV - UV promote to IV ok 69 - += with positive ok 70 - += with negative ok 71 - += with positive ok 72 - += with negative ok 73 - += with positive ok 74 - += with negative ok 75 - -= with positive ok 76 - -= with negative ok 77 - -= with negative ok 78 - -= with negative ok 79 - -= with positive ok 80 - -= with positive ok 81 - multiplication of two positive integers ok 82 - multiplication of negative and positive integer ok 83 - multiplication of positive and negative integer ok 84 - multiplication of two negative integers ok 85 - multiplication: 0xFFFF and 0xFFFF: pos pos ok 86 - multiplication: 0xFFFF and 0xFFFF: pos neg ok 87 - multiplication: 0xFFFF and 0xFFFF: pos neg ok 88 - multiplication: 0xFFFF and 0xFFFF: neg neg ok 89 - multiplication: 0xFFFF and 0x10001: pos pos ok 90 - multiplication: 0xFFFF and 0x10001: pos neg ok 91 - multiplication: 0xFFFF and 0x10001: neg pos ok 92 - multiplication: 0xFFFF and 0x10001: neg neg ok 93 - multiplication: 0x10001 and 0xFFFF: pos pos ok 94 - multiplication: 0x10001 and 0xFFFF: pos neg ok 95 - multiplication: 0x10001 and 0xFFFF: neg pos ok 96 - multiplication: 0x10001 and 0xFFFF: neg neg ok 97 - multiplication: NV: pos pos ok 98 - multiplication: NV: pos neg ok 99 - multiplication: NV: neg pos ok 100 - multiplication: NV: neg neg ok 101 - multiplication: overflow an IV in 32-bit: pos pos ok 102 - multiplication: overflow an IV in 32-bit: pos neg ok 103 - multiplication: overflow an IV in 32-bit: neg pos ok 104 - multiplication: overflow an IV in 32-bit: neg neg ok 105 - multiplication: overflow an IV in 32-bit: pos pos ok 106 - multiplication: overflow an IV in 32-bit: pos neg ok 107 - multiplication: overflow an IV in 32-bit: neg pos ok 108 - multiplication: overflow an IV in 32-bit: neg neg ok 109 - multiplication: overflow a positive IV in 32-bit: pos pos ok 110 - multiplication: overflow a positive IV in 32-bit: pos neg ok 111 - multiplication: overflow a positive IV in 32-bit: neg pos ok 112 - multiplication: overflow a positive IV in 32-bit: neg neg ok 113 - multiplication: overflow a positive IV in 32-bit: pos pos ok 114 - multiplication: overflow a positive IV in 32-bit: pos neg ok 115 - multiplication: overflow a positive IV in 32-bit: neg pos ok 116 - multiplication: overflow a positive IV in 32-bit: neg neg ok 117 - multiplication: hex product: pos pos ok 118 - multiplication: hex product: pos neg ok 119 - multiplication: hex product: neg pos ok 120 - multiplication: hex product: neg neg ok 121 - ignore leading space: addition ok 122 - ignore leading space: subtraction ok 123 - floating point and string equivalent: positive ok 124 - floating point and string equivalent: negative ok 125 - division of two positive integers ok 126 - division of positive integer by negative ok 127 - division of negative integer by positive ok 128 - division of negative integer by negative ok 129 - division of positive hex by positive integer ok 130 - division of positive hex by negative integer ok 131 - division of negative hex by negative integer ok 132 - division of negative hex by positive integer ok 133 - division of floating point without fractional part ok 134 - division of positive floating point by positive integer ok 135 - division of positive floating point by negative integer ok 136 - division of negative floating point by positive integer ok 137 - division of negative floating point by negative integer ok 138 - division of very large number by 1 ok 139 - division of very large number by 2 ok 140 - division of two very large numbers ok 141 - division of two very large numbers ok 142 - integer times floating point ok 143 - integer times integer ok 144 - floating point times integer ok 145 - integer plus zero times integer ok 146 - defeat any future optimizer ok 147 - absolute value ok 148 # 9.15131444281685e+019 is close to 9.15131444281685e+019\, $^O eq MSWin32 - 64 bit: integer times floating point ok 149 # 9.15131444281685e+019 is close to 9.15131444281685e+019\, $^O eq MSWin32 - 64 bit: integer times integer ok 150 # 9.15131444281685e+019 is close to 9.15131444281685e+019\, $^O eq MSWin32 - 64 bit: floating point times integer ok 151 # 9.15131444281685e+019 is close to 9.15131444281685e+019\, $^O eq MSWin32 - 64 bit: integer plus zero times integer ok 152 # 9.15131444281685e+019 is close to 9.15131444281685e+019\, $^O eq MSWin32 - 64 bit: defeat any future optimizer ok 153 - $1 vs "$1" * something ok 154 - something * $1 vs "$1" ok 155 - $1 vs "$1" + something ok 156 - something + $1 vs "$1" ok 157 - $1 vs "$1" - something ok 158 - something - $1 vs "$1" ok 159 - $1 vs "$1" ** something ok 160 - something ** $1 vs "$1" ok 161 - $1 vs "$1" / something ok 162 - something / $1 vs "$1" ok 163 - $1 vs "$1" \<=> something ok 164 - something \<=> $1 vs "$1" ok 165 - $1 vs "$1" % something ok 166 - something % $1 vs "$1" ok 167 - infinity ok 168 - 0.153e-305 ok 169 - 0.1530e-305 ok 170 - 0.15300e-305 ok 171 - 0.153000e-305 ok 172 - 0.1530000e-305 ok 173 - 0.1530001e-305 ok 174 - min single not ok 175 - min double ok 176 - 1.23 ok 177 - 1.23 with leading space ok 178 - 1.23 with trailing space ok 179 - 1.23 with unary plus ok 180 - 1.23 with unary minus ok 181 - 1.23e4
C:\p521\srcnew\t>
C:\>perl -V
Summary of my perl5 (revision 5 version 21 subversion 6) configuration:
Derived from:
Platform:
osname=MSWin32\, osvers=5.2\, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended\, useposix=true\, d_sigaction=undef
useithreads=define\, usemultiplicity=define
use64bitint=undef\, use64bitall=undef\, uselongdouble=undef
usemymalloc=n\, bincompat5005=undef
Compiler:
cc='cl'\, ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GS- -GL
-DWIN32 -D_
CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE -DPE
RL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME -DNO_MATHOMS
-DPERL_IMPLICIT_
CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO'\,
optimize='-O1 -MD -Zi -DNDEBUG -GS- -GL'\,
cppflags='-DWIN32'
ccversion='15.00.30729.01'\, gccversion=''\, gccosandvers=''
intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234
d_longlong=undef\, longlongsize=8\, d_longdbl=define\, longdblsize=8\,
longdblki
nd=0
ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='__int64'\,
lseeksi
ze=8
alignbytes=8\, prototype=define
Linker and Libraries:
ld='link'\, ldflags ='-nologo -nodefaultlib -debug -opt:ref\,icf
-ltcg -libpa
th:"c:\p521\lib\CORE" -machine:x86 "/manifestdependency:type='Win32'
name='Micr
osoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publi
cKeyToken='6595b64144ccf1df' language='*'"'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.l
ib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32
.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib
msvcrt.
lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg
32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws
2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib msv
crt.lib
libc=msvcrt.lib\, so=dll\, useshrplib=true\, libperl=perl521.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs\, dlext=dll\, d_dlsymun=undef\, ccdlflags=' '
cccdlflags=' '\, lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref\,icf -l
tcg -libpath:"c:\p521\lib\CORE" -machine:x86
"/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitectur
e='*' publicKeyToken='6595b64144ccf1df' language='*'"'
Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY NO_MATHOMS PERLIO_LAYERS PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: uncommitted-changes Built under MSWin32 Compiled at Oct 25 2014 06:14:49 @INC: C:/p521/site/lib C:/p521/lib .
C:\>perl -e" my $num = 2.2250738585072014e-308; print $num" 2.2250738585072e-308 C:\>
C:\p521\srcnew\t>perl -I..\lib -V Summary of my perl5 (revision 5 version 21 subversion 7) configuration: Derived from: 3a28716c57e8b57c831160a0ec151b83d7edaa7f Ancestor: b68eab22f47f27e55acb9cccd69e982cdd595f45 Platform: osname=MSWin32\, osvers=5.2\, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended\, useposix=true\, d_sigaction=undef useithreads=define\, usemultiplicity=define use64bitint=undef\, use64bitall=undef\, uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler: cc='icl'\, ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GS- -GL -DWIN32 -D _CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DP ERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME -DNO_MATHOMS -DPERL_IMPLICIT _CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO'\, optimize='-O1 -MD -Zi -DNDEBUG -GS- -GL'\, cppflags='-DWIN32' ccversion='12.1.5.344'\, gccversion=''\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234\, doublekind=3
d_longlong=undef\, longlongsize=8\, d_longdbl=define\, longdblsize=8\,
longdblki
nd=0
ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='__int64'\,
lseeksi
ze=8
alignbytes=8\, prototype=define
Linker and Libraries:
ld='xilink'\, ldflags ='-nologo -nodefaultlib -debug -opt:ref\,icf
-ltcg -lib
path:"c:\p521\lib\CORE" -machine:x86 "/manifestdependency:type='Win32'
name='Mi
crosoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' pub
licKeyToken='6595b64144ccf1df' language='*'"'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.l
ib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32
.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib
libircm
t.lib libmmd.lib msvcrt.lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg
32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws
2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
comctl32.lib lib
ircmt.lib libmmd.lib msvcrt.lib
libc=msvcrt.lib\, so=dll\, useshrplib=true\, libperl=perl521.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs\, dlext=dll\, d_dlsymun=undef\, ccdlflags=' '
cccdlflags=' '\, lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref\,icf -l
tcg -libpath:"c:\p521\lib\CORE" -machine:x86
"/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitectur
e='*' publicKeyToken='6595b64144ccf1df' language='*'"'
Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY NO_MATHOMS PERLIO_LAYERS PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: uncommitted-changes 3bf2b9cbed3b650a62744c7007ca46a9843861c4 9cecf67a0e2b3fdf7f9f7b4e76027349432b7b7d c38e06ad9818f57db6860c179f5071a3d49ce75b 72a068a1b42ddf463fecb3be95fa6798771b9d91 80ef1d38a95104b850b8e81e03dd834d72be1f6a 4bc490ac84ce5cd8a89fce83ed50d4a9064a5f4a 9aff0de73f187adbd5bf4f84e58008be1c972768 3a28716c57e8b57c831160a0ec151b83d7edaa7f Built under MSWin32 Compiled at Dec 5 2014 20:59:35 @INC: ..\lib C:/p521/srcnew/t/lib .
C:\p521\srcnew\t>perl -e" my $num = 2.2250738585072014e-308; print $num" 0 C:\p521\srcnew\t>
bulk88 (via RT) \perlbug\-followup@​perl\.org wrote: [...] :Not sure what to :debug next or where perl converts Perl source code FPs constants to :machine NVs.
I think that'd be Perl_scan_num() in toke.c.
Hugo
The RT System itself - Status changed from 'new' to 'open'
Some more facts about this bug
ICC 32 bit blead perl -Od non-DEBUGGING\, not reproduced ICC 32 bit blead perl -O1 non-DEBUGGING\, reproduced
This will be difficult and slow to fix since a C debugger is very difficult to use with optimized code.
-- bulk88 ~ bulk88 at hotmail.com
On Fri Jan 02 00:38:44 2015\, bulk88 wrote:
Some more facts about this bug
ICC 32 bit blead perl -Od non-DEBUGGING\, not reproduced ICC 32 bit blead perl -O1 non-DEBUGGING\, reproduced
This will be difficult and slow to fix since a C debugger is very difficult to use with optimized code.
Still a problem on 5.22 RC 0.
Test Summary Report
opbasic/arith.t (Wstat: 0 Tests: 186 Failed: 1) Failed test: 175 Files=2384\, Tests=696238\, 2381 wallclock secs (88.67 usr + 22.41 sys = 111.08 CP U) Result: FAIL NMAKE : fatal error U1077: '.\perl.exe' : return code '0x1' Stop.
-- bulk88 ~ bulk88 at hotmail.com
Migrated from rt.perl.org#123375 (status was 'open')
Searchable as RT123375$