Please reopen this bug for 3.4.0. The summary should read something like "movqi operand constraints too restrictive for TARGET_COLDFIRE" This ICE was already present in 3.0.4 (PR c/5753), but keeps appearing intermittently, probably triggered by middle-end changes. The ICE can be triggered on 3.3-branch and it was apparently latent in mainline until after the 20030107 snapshot. Both 20030114 and 20030121 consistently show it. The problem has also been discussed shortly here: http://gcc.gnu.org/ml/gcc/2004-01/msg00458.html It seems this bug could be fixed by adding a new insn for TARGET_COLDFIRE with relaxed constraints and perhaps a longer/slower instruction sequence. m68k-uclinux-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -Os -Wa,--bitwise-or -I/usr/local/src/uclinux-tools/linux-2.6.x/include -m5200 -msoft-float -fno-builtin -nostdinc -D_LIBC -I../../include -I. -I/usr/local/lib/gcc/m68k-uclinux/3.4.0/include -DNDEBUG -DL__fpmaxtostr printf.c -c -o _fpmaxtostr.o printf.c: In function `_fpmaxtostr': printf.c:2454: error: insn does not satisfy its constraints: (insn 1378 536 537 38 (set (reg:QI 8 %a0) (mem:QI (plus:SI (reg/f:SI 14 %a6) (const_int -209 [0xffffff2f])) [0 mode+0 S1 A8])) 33 {*m68k.md:825} (nil) (nil)) printf.c:2454: internal compiler error: in reload_cse_simplify_operands, at postreload.c:378 This is the offending pattern: (define_expand "movqi" [(set (match_operand:QI 0 "nonimmediate_operand" "") (match_operand:QI 1 "general_src_operand" ""))] "" "") (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=d,*a,m") (match_operand:QI 1 "general_src_operand" "dmSi*a,di*a,dmSi"))] "!TARGET_COLDFIRE" "* return output_move_qimode (operands);") (define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=d<Q>,dm,d*a") (match_operand:QI 1 "general_src_operand" "dmi,d<Q>,di*a"))] "TARGET_COLDFIRE" "* return output_move_qimode (operands);")
Confirmed.
*** Bug 5753 has been marked as a duplicate of this bug. ***
coldfire is not a primary target so I have changed the target milestone to 3.4.1.
Postponed until 3.4.2.
This patch fixes the bug: 2004-05-05 Peter Barada <peter@the-baradas.com> * gcc/config/m68k/m68k.h(EXTRA_CONSTRAINT): add 'U' for register offset addressing. * gcc/config/m68k/m68k.md: Add 'U,U' alternative to ColdFire variants of movsi,movhi,movqi insn patterns. It's already present on mainline and I've been using it in my local 3.4 tree for some time. I'd like to backport it to 3.4 before 3.4.1.
Subject: Re: [3.4/3.5 Regression] movqi operand constraints too restrictivefor TARGET_COLDFIRE bernie at develer dot com wrote: > ------- Additional Comments From bernie at develer dot com 2004-06-10 00:13 ------- > This patch fixes the bug: > > 2004-05-05 Peter Barada <peter@the-baradas.com> > * gcc/config/m68k/m68k.h(EXTRA_CONSTRAINT): add 'U' for > register offset addressing. > * gcc/config/m68k/m68k.md: Add 'U,U' alternative to ColdFire > variants of movsi,movhi,movqi insn patterns. > > It's already present on mainline and I've been using it in my > local 3.4 tree for some time. > > I'd like to backport it to 3.4 before 3.4.1. Backporting this patch for 3.4.1 is fine. Please proceed!
Applied to 3_4-branch.