Ticket #1488 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

fix test suite when building with ICC

Reported by: bubaflub Owned by:
Priority: normal Milestone:
Component: testing Version: 2.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

When building parrot with ICC a number of warnings are thrown but more importantly a few coretests fail.

t/op/arithmetics.t: Failed tests: 21, 24 t/op/number.t: Failed test: 131 t/op/sprintf.t: Failed test: 157 t/op/trans_old.t: Failed test: 11 t/pmc/float.t: Failed test: 44

Notes:

These seem to all be dealing with -0. The config step is reporting that ICC can handle negative zeroes, and the C code behind is *is* handling a negative zero.

Attachments

t_op_trans_old_t.patch Download (0.8 KB) - added by bubaflub 12 years ago.
patch for t/op/trans_old.t to add skip block if no -0

Change History

Changed 12 years ago by bubaflub

t/op/trans_old.t is currently testing PASM, and the failing line is 340. This test generates t/op/trans_old_11.pasm, and without ICC (on my machine) the test pasts. According to src/ops/math.ops (line 1012) atan with three arguments:

The three-argument versions set $1 to the arc tangent (in radians) of
$2 / $3, taking account of the signs of the arguments in determining the
quadrant of the result.

What we're doing dividing -0.0 / -0.0 is beyond me, but hey, it passes without ICC.

Attached is a patch that throws a skip block around this test if we don't have negative zeroes, but that doesn't really solve this scenario.

Changed 12 years ago by bubaflub

patch for t/op/trans_old.t to add skip block if no -0

Changed 12 years ago by bubaflub

the failed test with t/pmc/float.t can be reduced to this test case:

$P0 = new ['Float']
$P0 = 0.0
neg $P0
print $P0
$S0 = $P0
print $S0

.

I get "0" both times with ICC.

Changed 12 years ago by bubaflub

the failed test with t/op/sprintf.t fails on this line in sprintf_tests:

%.0g		-0.0			-0					C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix

which means it's trying to sprintf -0.0 as -0.

A reduced case (via parrot_shell) is:

new $P0, ['FixedPMCArray']
set $P0, 1
set $P0[0], '-0.0'
sprintf $S0, "%.0g", $P0
print $S0
.

I get "0" (and not "-0").

Changed 12 years ago by bubaflub

Weirdness continues: the c test in config/auto/neg0.pm (and config/auto/neg_0/test_c.in) run

printf("%.0f", -0.0);

and check if the output is -0 or just 0.

When I run the same code on parrot_shell compiled by ICC:

new $P0, ['FixedPMCArray']
set $P0, 1
set $P0[0], '-0.0'
sprintf $S0, "%.0f", $P0
print $S0
.

I get "0" instead of "-0". That means somewhere parrot is loosing the -0 in all the hoops it's jumping through.

Changed 12 years ago by whiteknight

found this bug ticket at the ICC website:

 http://software.intel.com/en-us/articles/zero-not-negated-1/

Changed 12 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed

fixed with branch merge in r44840.

Note: See TracTickets for help on using tickets.