This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trunk][patch] don't use SAVE_EXPR on TYPE_SIZE


On Tue, Jun 10, 2008 at 5:11 PM, Rafael Espindola <espindola@google.com> wrote:
> The attached patch avoids the use of SAVE_EXPR on TYPE_SIZE, since a
> TYPE_SIZE is never executed.

It _is_ executed after gimplification.  See maybe_with_size_expr.

Richard.

> This fixes
> -----------------------------
> class string    {
>  int  b;
>  public:
>  string()   : b()      { }
> };
>
> int a;
> void ConvertInsertRequest() {
>  string*   reqs_ = new string[a];
> }
> ---------------------------
>
> On the LTO branch, but since it is not LTO specific I would like to
> commit it on trunk.
>
> OK if it bootstraps and tests are OK?
>
>
> 2008-06-10  Rafael Avila de Espindola  <espindola@google.com>
>
>        * init.c (build_new_1): add nelts_for_type argument.
>        (build_new): create nelts_for_type without a SAVE_EXPR.
>
>
> Cheers,
> --
> Rafael Avila de Espindola
>
> Google Ireland Ltd.
> Gordon House
> Barrow Street
> Dublin 4
> Ireland
>
> Registered in Dublin, Ireland
> Registration Number: 368047
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]