[PATCH] Fix optimization regression in constant folder

Ian Lance Taylor iant@google.com
Mon Oct 1 00:10:00 GMT 2007


Eric Botcazou <ebotcazou@adacore.com> writes:

> > That doesn't make sense: a type either wraps on overflow or is
> > undefined on overflow.
> 
> Well, I've given the rationale and I stand by it.  We already have the 
> property that, if flag_strict_overflow is not set, signed types are neither 
> TYPE_OVERFLOW_WRAPS nor TYPE_OVERFLOW_UNDEFINED.

Right.  A type can be neither.  But you were asking for sizetypes to
be both, and that does not make sense.


> > Richard's patch for PR 30364 should test TYPE_OVERFLOW_UNDEFINED, not
> > TYPE_OVERFLOW_WRAPS.
> 
> Makes sense, but that won't change anything as far as Ada is concerned.

Then I don't understand what change you want to make.

I want to move toward eliminating TYPE_IS_SIZETYPE checks from the
middle-end, and capture them entirely in TYPE_OVERFLOW_UNDEFINED: a
sizetype is an unsigned type with undefined overflow.

What prevents us from doing that?

Ian



More information about the Gcc-patches mailing list