From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29071 invoked by alias); 16 Apr 2009 11:37:28 -0000 Received: (qmail 29023 invoked by uid 48); 16 Apr 2009 11:37:16 -0000 Date: Thu, 16 Apr 2009 11:37:00 -0000 Message-ID: <20090416113716.29022.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/39779] ICE shifting byte to the right with constant > 7FFFFFFF In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" 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: 2009-04/txt/msg01329.txt.bz2 ------- Comment #2 from ubizjak at gmail dot com 2009-04-16 11:37 ------- It looks that convert_modes has some issues. When expanding shift RTX, convert_modes is called from #0 convert_modes (mode=QImode, oldmode=QImode, x=0xb7d05fe8, unsignedp=0) at ../../gcc-svn/trunk/gcc/expr.c:769 #1 0x083455ec in expand_binop_directly (mode=USQmode, binoptab=0x8a02148, op0=, op1=0xb7d05fe8, target=0xb7d2a2d0, unsignedp=, methods=OPTAB_DIRECT, last=0xb7c8f72c) at ../../gcc-svn/trunk/gcc/optabs.c:1488 #2 0x08343389 in expand_binop (mode=QImode, binoptab=0x8a02148, op0=0xb7d2a2e8, op1=0xb7d05fe8, target=0xb7d2a2d0, unsignedp=0, methods=OPTAB_DIRECT) at ../../gcc-svn/trunk/gcc/optabs.c:1601 #3 0x08209c95 in expand_shift (code=RSHIFT_EXPR, mode=QImode, shifted=0xb7d2a2e8, amount=0xb7d29ec4, target=0xb7d2a2d0, unsignedp=0) at ../../gcc-svn/trunk/gcc/expmed.c:2244 as: convert_modes (mode=QImode, oldmode=QImode, x=0xb7d05fe8, unsignedp=0) at ../../gcc-svn/trunk/gcc/expr.c:769 (gdb) p debug_rtx (x) (const_int -557921043 [0xdebecced]) We immediatelly hit: if (mode == oldmode) return x; so, we return "(const_int -557921043 [0xdebecced])" that doesn't satisfy QImode constraint. The compilation goes downhill from there... This looks like generic RTL optimization problem. -- ubizjak at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39779