[Bug c/35634] [4.3/4.4/4.5 Regression] operand of pre-/postin-/decrement not promoted

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Sat Apr 11 16:33:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list