From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25476 invoked by alias); 15 Aug 2004 18:57:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25469 invoked by uid 48); 15 Aug 2004 18:57:34 -0000 Date: Sun, 15 Aug 2004 18:57:00 -0000 Message-ID: <20040815185734.25468.qmail@sourceware.org> From: "bommar33 at msu dot edu" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040815165530.17036.bommar33@msu.edu> References: <20040815165530.17036.bommar33@msu.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/17036] [3.5 Regression] ICE: (A >> N) & 1 ? (1 << N) : 0 where A of type unsigned int X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg01452.txt.bz2 List-Id: ------- Additional Comments From bommar33 at msu dot edu 2004-08-15 18:57 ------- > This patch should fixit but I don't have time to do a full bootstrap and > regression test on the patch. > > ------------------------------------------------------------------- > Index: fold-const.c > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/fold-const.c,v > retrieving revision 1.435 > diff -c -p -r1.435 fold-const.c > *** fold-const.c 12 Aug 2004 04:01:04 -0000 1.435 > --- fold-const.c 15 Aug 2004 17:53:10 -0000 > *************** fold (tree expr) > *** 8874,8879 **** > --- 8874,8880 ---- > tree tem = TREE_OPERAND (arg0, 0); > STRIP_NOPS (tem); > if (TREE_CODE (tem) == RSHIFT_EXPR > + && TREE_CODE (TREE_OPERAND (tem, 1)) == INTEGER_CST > && (unsigned HOST_WIDE_INT) tree_log2 (arg1) == > TREE_INT_CST_LOW (TREE_OPERAND (tem, 1))) > return fold (build2 (BIT_AND_EXPR, type, > ------------------------------------------------------------------- > When patched against the 20040801 tree that I had initially generated the error on, it successfully recompiled and properly generated the code. Thanks to both of you for the quick response time :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17036