This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR 34688: ICE in output_operand.

Richard Guenther wrote:
On Jan 26, 2008 11:00 PM, Maxim Kuvyrkov <> wrote:

Here is a proposed patch for PR 34688:

The failure in output_operand () is due to insn
(insn 150 93 213 (set (reg:HI 2 %d2 [51])
         (const:HI (truncate:HI (minus:SI (label_ref:SI 31)
                     (label_ref:SI 28))))) 39 {*} (nil)

The source of the set is a constant address, but final.c:
output_const_addr () does not handle rtx code TRUNCATE, hence the ICE.

I don't see why TRUNCATE is any different from {ZERO, SIGN}_EXTEND, both
of which are handled withing output_const_addr ().  The patch I propose
simply adds TRUNCATE to the clause for *_EXTENDs.

The failure was reported only against m68k/coldfire, so the testcase is
placed into

OK for trunk/4.1/4.2 ?

Ok for trunk, but please add the testcase to gcc.c-torture/compile instead. Also wait with backporting until after 4.2.3 is released, the branch is currently frozen.

I retested the fix for 4.2 branch on x86_64-linux-gnu with no regressions. I'll apply the patch to the branch in a moment.

-- Maxim

Index: final.c
--- final.c     (revision 191631)
+++ final.c     (working copy)
@@ -3398,6 +3398,7 @@ output_addr_const (FILE *file, rtx x)
     case ZERO_EXTEND:
     case SIGN_EXTEND:
     case SUBREG:
+    case TRUNCATE:
       output_addr_const (file, XEXP (x, 0));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]