Bug 41029 - ICE RTL check: expected code 'reg', have 'post_inc' in rhs_regno, at rtl.h:1008
Summary: ICE RTL check: expected code 'reg', have 'post_inc' in rhs_regno, at rtl.h:1008
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P4 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 20:56 UTC by Ryan Mansfield
Modified: 2009-08-12 22:29 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: sh4-unknown-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2009-08-10 23:15:48


Attachments
preprocessed source (6.60 KB, text/plain)
2009-08-10 21:40 UTC, Ryan Mansfield
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Mansfield 2009-08-10 20:56:52 UTC
Building sh4-unknown-linux-gnu target with --enable-checking=rtl yields.

gcc version 4.5.0 20090810 (experimental) [trunk revision 150633] (GCC)

../../../libiberty/floatformat.c: In function 'floatformat_from_double':
../../../libiberty/floatformat.c:683:1: internal compiler error: RTL check: expected code 'reg', have 'post_inc' in rhs_regno, at rtl.h:1008
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Steven Bosscher 2009-08-10 21:33:14 UTC
Can you attach the preprocessed source, so that we can try to reproduce this without building a complete cross-toolchain?
Comment 2 Ryan Mansfield 2009-08-10 21:40:56 UTC
Created attachment 18338 [details]
preprocessed source
Comment 3 Ryan Mansfield 2009-08-10 22:12:12 UTC
It doesn't appear on gcc 4.3 and 4.4 branches. I'll narrow down when it was introduced.
Comment 4 Kazumoto Kojima 2009-08-10 23:15:48 UTC
GDB backtrace shows a target problem.  I'm testing the patch below.

	* config/sh/sh.md (reload_outdf__RnFRm+4): Fix thinko.

--- ORIG/trunk/gcc/config/sh/sh.md	2009-07-06 23:27:44.000000000 +0900
+++ trunk/gcc/config/sh/sh.md	2009-08-11 07:54:41.000000000 +0900
@@ -6065,7 +6065,7 @@ label:
           /* If we have modified the stack pointer, the value that we have
   	     read with post-increment might be modified by an interrupt,
 	     so write it back.  */
-          if (REGNO (addr) == STACK_POINTER_REGNUM)
+          if (REGNO (XEXP (addr, 0)) == STACK_POINTER_REGNUM)
 	    emit_insn (gen_push_e (reg0));
           else
 	    emit_insn (gen_addsi3 (XEXP (operands[1], 0), XEXP (operands[1], 0), GEN_INT (-4)));
Comment 5 Kazumoto Kojima 2009-08-12 22:26:35 UTC
Subject: Bug 41029

Author: kkojima
Date: Wed Aug 12 22:26:13 2009
New Revision: 150709

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150709
Log:
	PR target/41029
	* config/sh/sh.md (reload_outdf__RnFRm+4): Fix thinko.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.md

Comment 6 Kazumoto Kojima 2009-08-12 22:29:37 UTC
Fixed.