On Mon, 5 Nov 2001, J. David Bryan wrote:
Thank you for your message, Dave,
Following program (implementing sieve of Eratosthenes) doesn't work as expected: after adding [i] to SET it doesn't appear to be in it!!!
Your program works as expected on GPC version 20010604 (i486-pc- mingw32msvc). I receive only:
Checking if really prime: 2 Checking if really prime: 3 [...] Checking if really prime: 241 Checking if really prime: 251
I'm relieved somewhat (at least the program is good).
gpc -v
...to get the version of GPC, e.g.:
gpc version 20010604, based on 2.95.3 20010315 (release)
I've got:
gpc -v
Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf4.0b/2.95.3/specs gpc version 20010516, based on 2.95.3 20010315 (release)
Maybe it has something to do with the fact that I run GPC on Alpha 64-bit processor? I mean it worked OK for i in [0..31,64..95,128..159,192..223].
While for i in [32..63, 96..127, 160..191, 224-255] it was buggy.
This could have been caused by the fact that SET is represented by a 64-bit bit-field, and upper 32 bits of each bit field are treated wrong way (I don't think I miscompiled the compiler itself, since most of the tests in the testsuite passed ...)?????
Does my thinking make any sense to you?
Regards, Mirsad
-- This message has been made up using recycled ideas and language constructs. No plant or animal has been injured in process of making this message.