diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-03-23 11:23:54 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-03-23 11:23:54 +0000 |
commit | f300628bfbc6ade69b9cfc8444da511506ac7940 (patch) | |
tree | 32492dd132be17a03c5387a4663009b6d35598e7 | |
parent | 71f70d0c0ca7d5e76c98eaa7c64825ddd46bbfe7 (diff) | |
download | gcc-f300628bfbc6ade69b9cfc8444da511506ac7940.zip gcc-f300628bfbc6ade69b9cfc8444da511506ac7940.tar.gz gcc-f300628bfbc6ade69b9cfc8444da511506ac7940.tar.bz2 |
re PR bootstrap/85020 (gcc fails to bootstrap with profiledbootstrap and --with-build-config=bootstrap-lto)
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto22.adb | 9 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto22_pkg1.ads | 7 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto22_pkg2.adb | 9 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto22_pkg2.ads | 15 |
5 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2e6651a..81c93b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/gcc/testsuite/gnat.dg/lto22.adb b/gcc/testsuite/gnat.dg/lto22.adb new file mode 100644 index 0000000..6478b78 --- /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 0000000..c0b24b4 --- /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 0000000..e84cce8 --- /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 0000000..f3a20f8 --- /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; |