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.
Can you attach the preprocessed source, so that we can try to reproduce this without building a complete cross-toolchain?
Created attachment 18338 [details] preprocessed source
It doesn't appear on gcc 4.3 and 4.4 branches. I'll narrow down when it was introduced.
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)));
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
Fixed.