From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27115 invoked by alias); 24 Jun 2011 20:12:09 -0000 Received: (qmail 27099 invoked by uid 22791); 24 Jun 2011 20:12:07 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Jun 2011 20:11:54 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/49487] Internal compiler error in AVR code X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 24 Jun 2011 20:12:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg02188.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49487 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code CC| |gjl at gcc dot gnu.org --- Comment #4 from Georg-Johann Lay 2011-06-24 20:11:20 UTC --- I see this on 4.5.2 In 185r.asmcons we have insn 40: (insn 40 38 41 4 foo.c:6 (parallel [ (set (reg:HI 94) (rotate:HI (reg/v:HI 66 [ _x ]) (const_int 8 [0x8]))) (clobber (reg:QI 95)) ]) 64 {*rotbhi} (expr_list:REG_DEAD (reg/v:HI 66 [ _x ]) (expr_list:REG_UNUSED (reg:QI 95) (nil)))) and in 188r.ira it is: (insn 40 38 41 4 foo.c:6 (parallel [ (set (reg:HI 20 r20 [94]) (rotate:HI (reg/v:HI 20 r20 [orig:66 _x ] [66]) (const_int 8 [0x8]))) (clobber (mem/c:QI (plus:HI (reg/f:HI 28 r28) (const_int 1 [0x1])) [3 %sfp+1 S1 A8])) ]) 64 {*rotbhi} (nil)) At first sight I thought it is a reload bug, but it's not. The bug goes like that: operand3 gets constraint verbatim from rotx iterator, witch reads for HI (HI "X,X,X") That was correct if reload would supply a scratch. However, these rot patterns don't request a scratch, the respective expander already supplies a pseudo. So the "X" does not mean "don't need a scratch", instead it means "everything is fine" so that reload need not generate reload insns to force "r" or whatever constraint. So either the constrint must be "=&r" or so if a pseudo is pre-generated (this is waste because the reg is not needed and can even force a frame/frame pointer) or this has to be rewritten as a proper scratch.