This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 51198, DECL_INITIAL still contains stuff for FIELD_DECLs
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Andrew Pinski <andrew dot pinski at caviumnetworks dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 1 Dec 2011 16:36:53 +0100
- Subject: Re: [PATCH] Fix PR 51198, DECL_INITIAL still contains stuff for FIELD_DECLs
- References: <CA+=Sn1mZ1PDCt5bd03VOqRscXa-5+JZXnNTeVi=69mGGkcNQ6Q@mail.gmail.com>
On Wed, Nov 30, 2011 at 8:05 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
> Hi,
> ?With C++11's decl initialization for non static members, the
> DECL_INITIAL for FIELD_DECLs contains stuff which we don't need to
> keep around after the front-end is done. ?This patch clears them in
> the free_lang_data pass.
>
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Ok.
Thanks,
Richard.
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree.c (free_lang_data_in_decl): Clear FIELD_DECL's DECL_INITIAL also.
>
> testsuite/ChangeLog:
> * g++.dg/torture/pr51198.C: New testcase.