Attached code does not compile with '-m4 -O2' for sh-linux target. It is correctry compiled with gcc-3.2.3. $ sh-linux-gcc -m4 -O2 -c bar.c bar.c: In function `bar': bar.c:11: error: insn does not satisfy its constraints: (insn:HI 26 13 14 1 (set (reg/v:SI 70 fr6 [orig:162 y ] [162]) (reg:SI 147 t)) 123 {movsi_ie} (nil) (nil)) bar.c:11: internal compiler error: in reload_cse_simplify_operands, at postreload.c:378 double bar (int x, int z1, double z2) { int y; if (z1 > z2) y = z1 + z2; else y = 0; return ((double) x + y); }
Confirmed. Compiles fine on mainline though.
SH is not a primary target; postponing until GCC 3.4.2.
Postponed until GCC 3.4.3.
Hi, Workaround : Use option -fno-cse-follow-jumps along with -O2 to get rid of ICE. Tested on GCC 3.4.2 snapshot dated 13 Aug 2004. Regards, Anil Paranjpe KPIT Cummins InfoSystems Ltd. Pune, India ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Free download of GNU based tool-chains for Renesas' SH and H8 Series. The following site also offers free technical support to its users. Visit http://www.kpitgnutools.com for details. Latest versions of KPIT GNU tools were released on June 1, 2004. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Postponed until GCC 3.4.4.
I fail to see why an ICE on a non-primary target is critical. Plus there is a workaround too.
(In reply to comment #6) > I fail to see why an ICE on a non-primary target is critical. Because our policies say so. Look into http://gcc.gnu.org/managament.html. To tell the truth, the fact that it's a secondary platform should lower its priority, not its severity.
> > I fail to see why an ICE on a non-primary target is critical. > > Because our policies say so. Look into http://gcc.gnu.org/managament.html. To > tell the truth, the fact that it's a secondary platform should lower its > priority, not its severity. This bug doesn't pass the "to affect a significant fraction of users" test.
Removing target milestone; SH is not a primary or secondary target.
Fixed in 4.0 and up.