linux-mips
[Top] [All Lists]

Re: gcc 3.2.0 bug causes kernel failure

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: gcc 3.2.0 bug causes kernel failure
From: "Steven J. Hill" <sjhill@realitydiluted.com>
Date: Fri, 05 Mar 2004 11:49:34 -0500
Cc: linux-mips@linux-mips.org
In-reply-to: <20040305152206.GA21264@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20040305152206.GA21264@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1
Ralf Baechle wrote:
Me and Steven have tracked down a LTP failure in the capget tests to a
bug in gcc 3.2.0.  Reducing optimization to just -O seems to solve the
problem.  To this point we've found the capget LTP problem with 2.4
kernel built with 3.2.0; 2.6.3 built with 2.95.4 seems to be ok.  We've
also only tested 32-bit kernels.  We'de be interested in test results
from other configurations, in particular 2.4 kernels built by later 3.2.x
compiler revisions would be of interest.

Further investigation of GCC 3.2.0 compiler optimizations shows that the
'-fschedule-insns' is to blame for incorrect code generation. By adding
the option '-fno-schedule-insns' correct code will be generated. This
was verified with the following instruction schedulings:

   -mcpu=r4300 -mips2
   -mcpu=r4600 -mips2
   -mcpu=r5000 -mips2

All of these exhibit the same failure. They also exhibit the same success
when the above compiler option is used. Thanks again to Ralf for giving
me more ideas to try and verify this. I have not verified that newer
gcc-3.2.x or gcc-3.3 versions fix this problem. Comments and more testing
are welcome. Thanks.

-Steve

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