C compiler bug
Mark G. Johnson
mark at mips.COM
Sun Jul 15 05:52:16 AEST 1990
In article <9007131953.AA08463 at prism> ae504pw at prism.gatech.edu writes:
>I believe I may have found a bug in the C compiler on the Iris.
>I compiled the following program, taken from the April 1985
>PC Tech Journal ...
>
> [code for "High Performance CRC Computation Routine" removed]
>
>Something is definitely amiss here! On a whim I compiled and ran
>the identical code on a Sequent S81. The results in that case are
>quite different as seen below.
>
Lint found little to complain about, so I tried the experiment of
compiling and running the program on a Sun SPARCstation 1, an
Apollo DN4000, and a MIPS RC3240. All three of these produced the same
output as the IRIS. So the scorecard thus far is:
Printed the result Printed the result that
John Forrest wanted John Forrest didn't want
---------------------------------------------------------------------------
Sequent S81 DYNIX V3.0.17.9 SGI Iris 4D/120GTX Irix 3.2
Sun SPARCstation 1 SunOs 4.0.3c
MIPS RC3240 RISC/os 4.50
Apollo DN4000 BSD 4.2 DOMAIN-IX
The "wrong answer" machines contain 4 different CPUs (R2000, Cy7C601,
R3000, 68020) and employ 3 different C compilers.
Here is the output from the SPARCstation 1. "diff" says it is identical to
the DN4000 and the RC3240 output.
00 - 0000 0000 0000 0000 0000 0000 0000 0000
08 - 0000 0000 0000 0000 0000 0000 0000 0000
10 - 0000 0000 0000 0000 0000 0000 0000 0000
18 - 0000 0000 0000 0000 0000 0000 0000 0000
20 - 0000 0000 0000 0000 0000 0000 0000 0000
28 - 0000 0000 0000 0000 0000 0000 0000 0000
30 - 0000 0000 0000 0000 0000 0000 0000 0000
38 - 0000 0000 0000 0000 0000 0000 0000 0000
40 - 0000 0000 0000 0000 0000 0000 0000 0000
48 - 0000 0000 0000 0000 0000 0000 0000 0000
50 - 0000 0000 0000 0000 0000 0000 0000 0000
58 - 0000 0000 0000 0000 0000 0000 0000 0000
60 - 0000 0000 0000 0000 0000 0000 0000 0000
68 - 0000 0000 0000 0000 0000 0000 0000 0000
70 - 0000 0000 0000 0000 0000 0000 0000 0000
78 - 0000 0000 0000 0000 0000 0000 0000 0000
80 - 0000 0000 0000 0000 0000 0000 0000 0000
88 - 0000 0000 0000 0000 0000 0000 0000 0000
90 - 0000 0000 0000 0000 0000 0000 0000 0000
98 - 0000 0000 0000 0000 0000 0000 0000 0000
a0 - 0000 0000 0000 0000 0000 0000 0000 0000
a8 - 0000 0000 0000 0000 0000 0000 0000 0000
b0 - 0000 0000 0000 0000 0000 0000 0000 0000
b8 - 0000 0000 0000 0000 0000 0000 0000 0000
c0 - 0000 0000 0000 0000 0000 0000 0000 0000
c8 - 0000 0000 0000 0000 0000 0000 0000 0000
d0 - 0000 0000 0000 0000 0000 0000 0000 0000
d8 - 0000 0000 0000 0000 0000 0000 0000 0000
e0 - 0000 0000 0000 0000 0000 0000 0000 0000
e8 - 0000 0000 0000 0000 0000 0000 0000 0000
f0 - 0000 0000 0000 0000 0000 0000 0000 0000
f8 - 0000 0000 0000 0000 0000 0000 0000 0000
TestArray1 CRC = 0x0000
TestArray2 CRC = 0x0000
Text = [This is a test message.]
CRC = 0000
--
-- Mark Johnson
MIPS Computer Systems, 930 E. Arques M/S 2-02, Sunnyvale, CA 94086
(408) 524-8308 mark at mips.com {or ...!decwrl!mips!mark}
More information about the Comp.sys.sgi
mailing list