[Top] [All Lists]

RE: Error in gcc version 2.96 20000731

To: <>
Subject: RE: Error in gcc version 2.96 20000731
From: "Kjeld Borch Egevang" <>
Date: Thu, 13 Sep 2001 22:47:25 +0200
Importance: Normal
In-reply-to: <>
Thanks for your reply.

I was trying to port SPEC CPU 2000 (benchmarks), and one of the tests
failed. I boiled it down to the attached program. For performance reasons it
could be perfectly valid not to use memset(), but I agree that the code
looks a bit odd.


-----Original Message-----
From: Maciej W. Rozycki []
Sent: 13. september 2001 17:15
To: Kjeld Borch Egevang
Subject: Re: Error in gcc version 2.96 20000731

On Thu, 13 Sep 2001, Kjeld Borch Egevang wrote:

> I discovered an optimization error in the current gcc for MIPS.

 Is 2.96 20000731 current?  I thought 3.0.1 is.

> When I compile the code below with -O2 it clears the code-field just
> after setting it. The instructions are mixed up. It works fine with -O1
> and -O0.

 Use "-fno-strict-aliasing"?

> If the "//" is removed in front of the first printf, it works too.

 Why don't you use memset() to clear the struct in the first place?

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>