------- Comment #4 from ian at airs dot com 2007-02-12 18:45 ------- Tom Tromey helped me recreate this with a cross-compiler.
I'm currently testing this patch: Index: lower-subreg.c =================================================================== --- lower-subreg.c (revision 121769) +++ lower-subreg.c (working copy) @@ -711,6 +711,23 @@ resolve_simple_move (rtx set, rtx insn) return insn; } + /* It's possible for the code to use a subreg of a decomposed + register while forming an address. We need to handle that before + passing the address to emit_move_insn. We pass NULL_RTX as the + insn parameter to resolve_subreg_use because we can not validate + the insn yet. */ + if (MEM_P (src) || MEM_P (dest)) + { + int acg; + + if (MEM_P (src)) + for_each_rtx (&XEXP (src, 0), resolve_subreg_use, NULL_RTX); + if (MEM_P (dest)) + for_each_rtx (&XEXP (dest, 0), resolve_subreg_use, NULL_RTX); + acg = apply_change_group (); + gcc_assert (acg); + } + /* If SRC is a register which we can't decompose, or has side effects, we need to move via a temporary register. */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30751