From: rguenth Date: Fri, 23 Mar 2018 11:23:54 +0000 (+0000) Subject: 2018-03-23 Eric Botcazou X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69f5f494c9e2ee410f6d2a35171ec2ba714f80d7;p=thirdparty%2Fgcc.git 2018-03-23 Eric Botcazou PR debug/85020 * gnat.dg/lto22.adb: New test. * gnat.dg/lto22_pkg1.ad[sb]: New helper. * gnat.dg/lto22_pkg2.ads: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258799 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e6651a2f519..81c93b4c8026 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-03-23 Eric Botcazou + + 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 PR c/80778 diff --git a/gcc/testsuite/gnat.dg/lto22.adb b/gcc/testsuite/gnat.dg/lto22.adb new file mode 100644 index 000000000000..6478b78bb76f --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto22.adb @@ -0,0 +1,9 @@ +-- { dg-do run } +-- { dg-options "-g -flto" { target lto } } + +with Lto22_Pkg1; + +procedure Lto22 is +begin + null; +end; diff --git a/gcc/testsuite/gnat.dg/lto22_pkg1.ads b/gcc/testsuite/gnat.dg/lto22_pkg1.ads new file mode 100644 index 000000000000..c0b24b42a400 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto22_pkg1.ads @@ -0,0 +1,7 @@ +with Lto22_Pkg2; use Lto22_Pkg2; + +package Lto22_Pkg1 is + + Public_1 : Rec := F; + +end Lto22_Pkg1; diff --git a/gcc/testsuite/gnat.dg/lto22_pkg2.adb b/gcc/testsuite/gnat.dg/lto22_pkg2.adb new file mode 100644 index 000000000000..e84cce843ea5 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto22_pkg2.adb @@ -0,0 +1,9 @@ +package body Lto22_Pkg2 is + + function F return Rec is + Var_1 : Rec; + begin + return Var_1; + end; + +end Lto22_Pkg2; diff --git a/gcc/testsuite/gnat.dg/lto22_pkg2.ads b/gcc/testsuite/gnat.dg/lto22_pkg2.ads new file mode 100644 index 000000000000..f3a20f8c2fa4 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto22_pkg2.ads @@ -0,0 +1,15 @@ +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;