[M3devel] one more (64 bit) m3tests issue

Rodney M. Bates rodney_bates at lcwb.coop
Thu Apr 29 23:45:23 CEST 2010


Looks like a 32/64 bit independence bug in the test. The test description, from
m3tests/src/makefile says "alignment of ARRAY OF BITS 32 FOR INTEGER".  This
type would be illegal on a 64-bit machine.

But the description is wrong.  The type in the source file
m3test/src/p1/p179/Main.m3 is actually "BITS 32 FOR [16_80000000..16_7FFFFFFF]"
And, on a 64-bit native machine, this really is an empty type, as the compiler
complains.

On a 64-bit machine, 16_80000000 means 16_00000000800000, positive and larger
than the upper bound.

How about BITS 32 FOR [Word.Shift(-1,31)..16_7FFFFFFF], to be the same on any
machine with >= 32-bit native word size?  Or (-16_7FFFFFFF)-1?, which would
be non-overflowing and same value on >= 32 bits.

I don't think this test can be coded for < 32 bits or other than 2's complement
and still be the same test.

Wasn't there a discussion of this a while back?

Olaf Wagner wrote:
> For AMD64_..., there is one more unexpected test failure:
> 
> http://hudson.modula3.com:8080/view/cm3/job/cm3-test-m3tests-AMD64_LINUX/555/testReport/(root)/m3tests/p179__alignment_of_ARRAY_OF_BITS_32_FOR_INTEGER 
> 
> 
> This test fails on all AMD64 platforms.
> 
> Comments? Ignore?
> 
> I think all the others are either ancient legacy or have been looked at
> by Tony and Jay and postponed.
> 
> Olaf



More information about the M3devel mailing list