[lto][patch] remove local variables from types (after gimplification)

Rafael Espindola espindola@google.com
Wed Jun 25 21:19:00 GMT 2008


> I updated to top of lto branch, and noticed the following test was
> first to fail:
>
>   FAIL: gcc.c-torture/compile/20020210-1.c  -O2 -flto  (internal
> compiler error)
>
> In this case, the failure is due to an attempt to stream out a SAVE_EXPR node.
> I have a development sandbox that includes the patch, but is apparently choosing
> a different order in which to stream out the nodes, and which exhibits a much
> more interesting failure, encountering a local variable in a type.
> The program is
> trivial:
>
>  void f(int a, struct {int b[a];} c) {}
>
> The problem is that the size of the *structure* type is variable, due
> to the embedded
> VLA.  While this program is not valid C99, it is apparently permitted
> as a GNU extension,
> and similar constructs arise in other languages, e.g. Ada.  Clearly we
> are not catching
> all of the occurrences of variables within types.  This may just be an
> oversight, but I'd
> like to know if it is generally the case that the middle-end/back-end
> does not not need
> this information, or whether the justification for erasing the size of
> array types is specific
> to the case of arrays.

I am sure it doesn't need to use it. I am not sure if it is using it.

Thanks for the test. I will try to remove this variable tomorrow.

> --Bill
>


Cheers,
-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047



More information about the Gcc-patches mailing list