[Bug ada/50294] ICE in output_constructor_regular_field

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 6 09:16:00 GMT 2011


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.

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

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

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



More information about the Gcc-bugs mailing list