FixedFloatArray.sort() tests fail on some compilers #929

Closed
leto opened this Issue Jan 15, 2013 · 2 comments

Comments

Projects
None yet
1 participant
Owner

leto commented Jan 15, 2013

Looks like the tests I added for FFA.sort() fail on certain versions of Clang but not others. The tests currently pass on this clang:

$ clang --version
clang version 2.8 (branches/release_28)
Target: x86_64-pc-linux-gnu
Thread model: posix

but fail on Travis CI, which is using version 3.1

http://travis-lite.com/parrot/parrot/jobs/4163058

Smolder shows this as the test ouput:

1..36
ok 1 - initial size is 0
ok 2 - changed size is 1
ok 3 - exception thrown when changing size
ok 4 - ok
ok 5 - ok
ok 6 - ok
ok 7 - ok
ok 8 - ok
ok 9
ok 10 - exception raised when setting nonexistent element
ok 11 - exception raised when getting nonexistent element
ok 12 - set int via PMC Key, get via int
ok 13 - set num via PMC Key, get via int
ok 14 - set string via PMC Key, get via int
ok 15 - set int via int, get via PMC Key
ok 16 - set num via int, get via PMC Key
ok 17 - set string via int, get via PMC Key
ok 18 - set PMC via int, get via PMC Key
ok 19 - clone of empty is empty
ok 20 - clone made a good clone
ok 21 - an empty FixedFloatArray is false
ok 22 - a non-empty FixedFloatArray is true
ok 23 - FFA does not do scalar
ok 24 - FFA does array
ok 25 - FFA does not do no_interface
ok 26 - get_iter works
ok 27 - New style init creates the correct # of elements
ok 28 - New style init creates the correct # of elements for a key constant
ok 29 - New style init does not dump core for negative array lengths
ok 30 - New style init (key constant) does not dump core for negative array lengths
ok 31 - converts to string
ok 32 - has string representation
not ok 33 - sort works
# Have: 5
# Want: 1
not ok 34 - sort works
# Have: 0
# Want: 3
not ok 35 - sort works
# Have: 3
# Want: 5
not ok 36 - sort works
# Have: 1
# Want: 10
Owner

leto commented Jan 15, 2013

Tests pass on gcc 4.4.5:

$ g++ --version
g++-4.4.real (Ubuntu/Linaro 4.4.4-14ubuntu5.1) 4.4.5
Owner

leto commented Feb 16, 2013

This has hopefully been fixed. The bug was that my questionable casting worked on 64 bit machines, but not 32 bits machines.

leto closed this Feb 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment