This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Do not generate special PARM_DECL in LTO mode
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Oct 2012 10:39:29 +0200
- Subject: Re: [Ada] Do not generate special PARM_DECL in LTO mode
- References: <5495945.UYn8P9iJAj@polaris>
On Mon, Oct 22, 2012 at 10:04 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> We generate a special PARM_DECL for Out parameters passed by copy at -O0, but
> it doesn't play nice with LTO so this patch removes it when LTO is enabled.
>
> Tested on x86_64-suse-linux, applied on the mainline and 4.7 branch.
Shouldn't it be simply the abstract origin for the VAR_DECL? Or be
not 'lowered'
here but be a 'proper' PARM_DECL with DECL_VALUE_EXPR? That said,
how is debug info emitted in the optimize case?
No objection to the patch as-is, but guarding sth with flag_generate_lto always
makes me suspicious ;)
Richard.
> 2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
>
> * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Out_Parameter>: Do not
> generate the special PARM_DECL for an Out parameter in LTO mode.
>
>
> --
> Eric Botcazou