On Thu, May 5, 2011 at 12:07 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
>> But where do you expand it without the SAVE_EXPR?  The same
>> restrictions apply there.  So I suppose you expand it to a function
>> in which case there is the context where the SAVE_EXPR can be
>> expanded exactly once.
>
> You don't have SAVE_EXPRs so you're precisely controlling what you're doing.
> Once a SAVE_EXPR is generated, things are pretty much out of control for the
> front-end.
>
>> But maybe I'm confused and simply lack an actual testcase that
>> shows the issue ;)
>
> Remove the call to global_bindings_p from variable_size and run gnat.dg.

Hm, ok.  I was more looking at removing the calls from fold-const.c where
it seems to protect things like folding x <= +Inf to x == x, stuff unlikely
to appear in type sizes.  I can imagine the Ada FE wanting to do
things with type sizes and variable_size's wrapping looks like merely
an optimization to me (for re-using values in nested array types
for example(?)).

Richard.

> --
> Eric Botcazou
>

Reply via email to