2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
PR debug/85020
* gnat.dg/lto22.adb: New test.
* gnat.dg/lto22_pkg1.ad[sb]: New helper.
* gnat.dg/lto22_pkg2.ads: Likewise.
From-SVN: r258799
+2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR debug/85020
+ * gnat.dg/lto22.adb: New test.
+ * gnat.dg/lto22_pkg1.ad[sb]: New helper.
+ * gnat.dg/lto22_pkg2.ads: Likewise.
+
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR c/80778
--- /dev/null
+-- { dg-do run }
+-- { dg-options "-g -flto" { target lto } }
+
+with Lto22_Pkg1;
+
+procedure Lto22 is
+begin
+ null;
+end;
--- /dev/null
+with Lto22_Pkg2; use Lto22_Pkg2;
+
+package Lto22_Pkg1 is
+
+ Public_1 : Rec := F;
+
+end Lto22_Pkg1;
--- /dev/null
+package body Lto22_Pkg2 is
+
+ function F return Rec is
+ Var_1 : Rec;
+ begin
+ return Var_1;
+ end;
+
+end Lto22_Pkg2;
--- /dev/null
+package Lto22_Pkg2 is
+
+ subtype Index_Type is Integer range 1 .. 20;
+
+ type Rec (<>) is private;
+
+ function F return Rec;
+
+private
+
+ type Rec (D : Index_Type := 2) is record
+ S : String (1 .. D) := "Hi";
+ end record;
+
+end Lto22_Pkg2;