Bug 7160 - gcc 3.1 gives an ICE when optimizing valid code
gcc 3.1 gives an ICE when optimizing valid code
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: c
3.1
: P3 normal
: ---
Assigned To: Richard Henderson
: ice-on-valid-code
: 8369 9504 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-28 12:56 UTC by a.watson
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
transcendental.i.bz2 (14.21 KB, application/octet-stream)
2003-05-21 15:16 UTC, a.watson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a.watson 2002-06-28 12:56:01 UTC
Compiling the C file transcendental.i (part of the Gwydion Dylan
compiler) with "gcc -O2" causes an ICE; compiling the same file with
"gcc -O1" does not. The precise output is:

$ gcc -O1 -c transcendental.i
$ gcc -O2 -c transcendental.i
transcendental.c: In function `transcendentalZtranscendentalZasin_METH_3':
transcendental.c:3732: Internal compiler error in subst_stack_regs_pat, at reg-stack.c:1441
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
$

Release:
3.1

Environment:
System: Linux sapi.astrosmo.unam.mx 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.1/configure --prefix=/fs/sapi/home0/alan/software/gcc-3.1

How-To-Repeat:
I append a bzipped and uuencoded form of transcendental.i. Try compiling
it with the "-O1" and "-O2" options.
Comment 1 a.watson 2002-06-28 12:56:01 UTC
Fix:
To work around the problem, compile this file with "-O1" instead 
of "-O2".
Comment 2 Richard Henderson 2002-09-26 18:10:46 UTC
Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-Why: .
Comment 3 Richard Henderson 2002-09-26 18:10:46 UTC
State-Changed-From-To: open->closed
State-Changed-Why: http://gcc.gnu.org/ml/gcc-patches/2002-09/msg01645.html