From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 371 invoked by alias); 15 Apr 2008 00:26:07 -0000 Received: (qmail 31305 invoked by uid 48); 15 Apr 2008 00:25:24 -0000 Date: Tue, 15 Apr 2008 00:26:00 -0000 Message-ID: <20080415002524.31304.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/35885] unsigned long long and while loop evaluation regression? In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "wilson at gcc dot gnu dot org" 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: 2008-04/txt/msg01028.txt.bz2 ------- Comment #5 from wilson at gcc dot gnu dot org 2008-04-15 00:25 ------- Gcc-2.5.8 uses the code I suggested was correct. gcc-2.6.3 does not. The ChangeLog entry is Fri Aug 5 12:29:42 1994 Jim Wilson (wilson@cygnus.com) * expmed.c (expand_mult): Accept DImode for synth_mult only if CONST_DOUBLE_HIGH is zero. Reject negative values for synth_mult if the mode is larger than HOST_BITS_PER_INT. Don't do the negate_variant if the mode is larger than HOST_BITS_PER_INT. So it seems that we used to allow any constant that would fit in a signed HWI, then I found a bug with negative values so I changed it to any constant that would fit in an unsigned HWI. Now we found another bug with a constant that doesn't fit in a signed HWI but does fit in an unsigned HWI. So now the apparent solution is to only accept positive values that fit in a signed HWI. But of course such values should never be found in a CONST_DOUBLE anyways. If they fit in a signed HWI they would have been emitted as a CONST_INT in the first place. I think we should just drop all of this CONST_DOUBLE nonsense. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35885