This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trunk][patch] don't use SAVE_EXPR on TYPE_SIZE
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Rafael Espindola" <espindola at google dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Diego Novillo" <dnovillo at google dot com>
- Date: Tue, 10 Jun 2008 17:14:47 +0200
- Subject: Re: [trunk][patch] don't use SAVE_EXPR on TYPE_SIZE
- References: <38a0d8450806100811r3a73da18v3c23f689269ec5ea@mail.gmail.com>
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
>