From: Eric Botcazou Date: Fri, 23 Mar 2018 11:23:54 +0000 (+0000) Subject: re PR bootstrap/85020 (gcc fails to bootstrap with profiledbootstrap and --with-build... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f300628bfbc6ade69b9cfc8444da511506ac7940;p=gcc.git re PR bootstrap/85020 (gcc fails to bootstrap with profiledbootstrap and --with-build-config=bootstrap-lto) 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. From-SVN: r258799 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e6651a2f51..81c93b4c802 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 00000000000..6478b78bb76 --- /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 00000000000..c0b24b42a40 --- /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 00000000000..e84cce843ea --- /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 00000000000..f3a20f8c2fa --- /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;