From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14797 invoked by alias); 11 Apr 2009 16:33:03 -0000 Received: (qmail 14746 invoked by alias); 11 Apr 2009 16:32:50 -0000 Date: Sat, 11 Apr 2009 16:33:00 -0000 Message-ID: <20090411163250.14745.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/35634] [4.3/4.4/4.5 Regression] operand of pre-/postin-/decrement not promoted In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" 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/msg01018.txt.bz2 ------- Comment #24 from rguenther at suse dot de 2009-04-11 16:32 ------- Subject: Re: [4.3/4.4/4.5 Regression] operand of pre-/postin-/decrement not promoted On Sat, 11 Apr 2009, joseph at codesourcery dot com wrote: > ------- Comment #23 from joseph at codesourcery dot com 2009-04-11 16:30 ------- > Subject: Re: [4.3/4.4/4.5 Regression] operand of pre-/postin-/decrement > not promoted > > On Sat, 11 Apr 2009, rguenth at gcc dot gnu dot org wrote: > > > On no-undefined-overflow branch the FE can do the increment/decrement on the > > target type safely (well, there are no NV variants of the > > {PRE,POST}{IN,DEC}REMENT > > expressions on the branch, so they at the moment all get lowered to > > possibly wrapping variants during gimplification). > > Of course increment/decrement of signed integer types at least as wide as > int should get lowered to the no-overflow variants unless -fwrapv; > likewise increment/decrement of pointer types. Whether through a > gimplification-time hook or through creating NV variants of > increment/decrement and having the front end create those when > appropriate. Indeed. As they are not valid gimple but only in generic I lean to a gimplification-time solution here. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35634