On Mon, Oct 22, 2012 at 10:04 AM, Eric Botcazou <ebotca...@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  <ebotca...@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

Reply via email to