Commit 2877ad9a by Eric Botcazou

Fix link failure with debug info in LTO mode

This fixes a regression whereby the program fails to link with debug
info in LTO mode because of an undefined reference to a symbol coming
from the object files containing the early debug info.

	* dwarf2out.c (dwarf2out_size_function): Run in early-DWARF mode.
parent 81ef67c1
2019-02-25 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2out.c (dwarf2out_size_function): Run in early-DWARF mode.
2020-02-25 Roman Zhuykov <zhroma@ispras.ru>
* doc/install.texi (--enable-checking): Adjust wording.
......
......@@ -27610,6 +27610,7 @@ dwarf2out_inline_entry (tree block)
static void
dwarf2out_size_function (tree decl)
{
set_early_dwarf s;
function_to_dwarf_procedure (decl);
}
......
2019-02-25 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto24.adb: New test.
* gnat.dg/lto24_pkg1.ads: New helper.
* gnat.dg/lto24_pkg2.ad[sb]: Likewise.
2020-02-25 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ssa-fre-86.c: New testcase.
......
-- { dg-do link }
-- { dg-options "-O -g -flto" { target lto } }
with Lto24_Pkg1;
procedure Lto24 is
R : Lto24_Pkg1.Rec (False);
begin
R.Empty := True;
end;
with Lto24_Pkg2;
package Lto24_Pkg1 is
Max_Elem : constant Natural := Lto24_Pkg2.Get;
type Arr is array (Natural range <>) of Boolean;
type Rec (B : Boolean) is record
I : Integer;
case B is
when True => A : Arr (1 .. Max_Elem);
when False => Empty : Boolean;
end case;
end record;
end Lto24_Pkg1;
package body Lto24_Pkg2 is
function Get return Natural is
begin
return 16;
end;
end Lto24_Pkg2;
package Lto24_Pkg2 is
function Get return Natural;
end Lto24_Pkg2;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment