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: [patch] Fix PR lto/44230


On Thu, May 27, 2010 at 3:24 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> it's the couple of LTO failures that are present in the gnat.dg testsuite when
> the assembler doesn't support .cfi_personality directive. ?Fixed by recording
> the first (fixed up) personality decl encountered and using it for the LTO
> personality routine if assembler directives aren't used.
>
> Tested on i586-suse-linux. ?I also ran gnat.dg with -fno-dwarf2-cfi-asm (the 2
> failures are fixed) and verified manually that lto6.adb still links with 2
> personality routines in default mode. ?OK for mainline?

Can you instead of checking DECL_FUNCTION_PERSONALITY
in lto_fixup_function do it in lto_materialize_function after

      /* Load the function body only if not operating in WPA mode.  In
         WPA mode, the body of the function is not needed.  */
      if (!flag_wpa)
        {
         allocate_struct_function (decl, false);
          announce_function (node->decl);
          lto_input_function_body (file_data, decl, data);

(thus only during LTO/LTRANS phase, not in WPA phase)?

Ok with that change.

Thanks,
Richard.

> 2010-05-27 ?Eric Botcazou ?<ebotcazou@adacore.com>
>
> ? ? ? ?PR lto/44230
> ? ? ? ?* dwarf2out.c (dwarf2out_begin_prologue): Fix nits in sorry message.
> lto/
> ? ? ? ?* lto.h (lto_eh_personality): New prototype.
> ? ? ? ?* lto.c: Include debug.h.
> ? ? ? ?(first_personality_decl): New static variable.
> ? ? ? ?(lto_fixup_function): Set it to the first DECL_FUNCTION_PERSONALITY.
> ? ? ? ?(lto_eh_personality_decl): New static variable.
> ? ? ? ?(lto_eh_personality): New function.
> ? ? ? ?* lto-lang.c (LANG_HOOKS_EH_PERSONALITY): Redefine to above function.
> ? ? ? ?* Make-lang.in (lto/lto.o): Add dependency on debug.h.
>
>
> --
> Eric Botcazou
>


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