re PR bootstrap/85020 (gcc fails to bootstrap with profiledbootstrap and --with-build...
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 23 Mar 2018 11:23:54 +0000 (11:23 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 23 Mar 2018 11:23:54 +0000 (11:23 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/lto22.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto22_pkg1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto22_pkg2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto22_pkg2.ads [new file with mode: 0644]

index 2e6651a2f519183864b48ad96681f4dab0403ef6..81c93b4c802682a40ea22ab98acf3c1248c4f92f 100644 (file)
@@ -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 (file)
index 0000000..6478b78
--- /dev/null
@@ -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 (file)
index 0000000..c0b24b4
--- /dev/null
@@ -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 (file)
index 0000000..e84cce8
--- /dev/null
@@ -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 (file)
index 0000000..f3a20f8
--- /dev/null
@@ -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;