http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50294

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 
2011-09-06 09:52:38 UTC ---
On Tue, 6 Sep 2011, ebotcazou at gcc dot gnu.org wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50294
> 
> --- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-09-06 
> 09:14:28 UTC ---
> > My idea with fixing the Ada issue would be to conditionally use a signed
> > or unsigned (sizetype) domain type.  Not sure if all of the middle-end
> > copes well with ssizetype domains (but well, we should fix it then).
> 
> Yes, IIRC I tried something like that at some point.  You also mentioned in an
> earlier thread that you tried to make sizetype signed.  What kind of problems
> did you run into?  This was the original setting of the Ada compiler, so the
> middle-end was able to support it, at least until relatively recently.

I run into various diagnostic issues in the C family frontends, so I 
quickly gave up.

> > Of course that wouldn't fix use of an even larger domain type
> > such as Unsigned_128_T is mod 2 ** 128 and appropriate large constants.
> > But I see several special-cases in the Gigi code that tries to handle
> > overflow situations.
> 
> GNAT doesn't support integral types bigger than 64-bit anyway.

And 32-bit for 32-bit targets?  sizetype is 32bits there ...

> > Thus, I think we ideally should allow any kind of integer type in
> > TYPE_DOMAIN, not just sizetype variants.  But that's of course an even
> > bigger change.
> 
> The signedness flip is already tricky...

Yeah, I backed off when seeing the amount of code I'd need to change
in GiGi ... esp. as I don't know the code well.

> > Sidenote: my idea was to remove special-casings of TYPE_IS_SIZETYPE from
> > folders but have a few special-cases explicit in size_binop so we know
> > the definite context from which they are invoked (like from stor-layout).
> > That's much better than to expose the special-casing from random
> > optimization passes that happen to call into fold.
> 
> OK, I see.

Reply via email to