Bug 11805 - [3.3 Regression] [H8300] ICE
[3.3 Regression] [H8300] ICE
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: target
3.3.1
: P1 critical
: 3.3.2
Assigned To: Not yet assigned to anyone
: ice-on-valid-code
: 12124 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-05 10:42 UTC by shrinivasa
Modified: 2003-09-02 09:16 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: h8300-unknown-coff
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-08-05 14:08:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shrinivasa 2003-08-05 10:43:00 UTC
Test case:
unsigned char foo(unsigned char ch)
{
   if( (0x01 & ch) > 0)
       return 1;
}
Above test code gives internal compiler error if compiled with option -O2 in 
3.3 branch for h8300 coff tool chain(all targhets). 
This error is not observed in 3.4 branch.
If we remove, " > 0" from test code, program gets compiled with -O2 option and 
also if we use any nonzero number instead of 0 then also it gets compiled 
successfully with -O2 option.
Comment 1 Andrew Pinski 2003-08-05 14:08:08 UTC
I can confirm this in 3.3.1 (20030728).
From final.c:
2795    #ifdef HAVE_ATTR_length
2796                /* This instruction should have been split in shorten_branches,
2797                   to ensure that we would have valid length info for the
2798                   splitees.  */
2799                abort ();
2800    #endif
Comment 2 Andrew Pinski 2003-08-05 14:11:29 UTC
I also can confirm this does not ICE on the mainline (20030718).
Comment 3 Andrew Pinski 2003-08-05 14:13:44 UTC
3.2.3 did not have the problem so this is a regression.
Comment 4 CVS Commits 2003-08-21 13:09:00 UTC
Subject: Bug 11805

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	kazu@gcc.gnu.org	2003-08-21 13:08:53

Modified files:
	gcc            : ChangeLog 
	gcc/config/h8300: h8300.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20030821-1.c 

Log message:
	PR target/11805
	* config/h8300/h8300.md (two anonymous patterns): Remove.
	* testsuite/gcc.c-torture/compile/20030821-1.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.710&r2=1.16114.2.711
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/h8300/h8300.md.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.123.2.5&r2=1.123.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.251&r2=1.2261.2.252
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20030821-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1

Comment 5 Kazu Hirata 2003-08-21 13:11:55 UTC
Just committed a fix.
Comment 6 CVS Commits 2003-08-21 13:13:23 UTC
Subject: Bug 11805

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kazu@gcc.gnu.org	2003-08-21 13:13:18

Modified files:
	gcc            : ChangeLog 
	gcc/config/h8300: h8300.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20030821-1.c 

Log message:
	PR target/11805
	* config/h8300/h8300.md (two anonymous patterns): Remove.
	* testsuite/gcc.c-torture/compile/20030821-1.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.830&r2=2.831
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/h8300/h8300.md.diff?cvsroot=gcc&r1=1.233&r2=1.234
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2986&r2=1.2987
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/20030821-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2

Comment 7 Kazu Hirata 2003-09-02 09:16:08 UTC
*** Bug 12124 has been marked as a duplicate of this bug. ***