Bug 15535 - [3.4 regression][sh-linux] ICE with -m4 -O2
Summary: [3.4 regression][sh-linux] ICE with -m4 -O2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.1
: P3 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-05-19 03:51 UTC by sugioka
Modified: 2006-02-28 09:24 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh-unknown-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.2.3 4.0.0
Known to fail: 3.3.4 3.4.1
Last reconfirmed: 2005-03-27 16:52:53


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sugioka 2004-05-19 03:51:03 UTC
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);
}
Comment 1 Dara Hazeghi 2004-06-01 23:22:26 UTC
Confirmed. Compiles fine on mainline though.
Comment 2 Mark Mitchell 2004-06-12 22:09:19 UTC
SH is not a primary target; postponing until GCC 3.4.2.
Comment 3 Mark Mitchell 2004-08-23 20:58:27 UTC
Postponed until GCC 3.4.3.
Comment 4 Anil Paranjpe 2004-08-24 11:15:03 UTC
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Comment 5 Mark Mitchell 2004-11-01 00:46:35 UTC
Postponed until GCC 3.4.4.
Comment 6 Eric Botcazou 2004-12-05 09:40:55 UTC
I fail to see why an ICE on a non-primary target is critical.  Plus there is a
workaround too.
Comment 7 Giovanni Bajo 2004-12-05 12:19:54 UTC
(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.
Comment 8 Eric Botcazou 2004-12-05 12:35:16 UTC
> > 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.
Comment 9 Mark Mitchell 2005-04-29 18:48:55 UTC
Removing target milestone; SH is not a primary or secondary target.
Comment 10 Gabriel Dos Reis 2006-02-28 09:24:50 UTC
Fixed in 4.0 and up.