summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/lto5.adb9
-rw-r--r--gcc/testsuite/gnat.dg/lto5_pkg.adb6
-rw-r--r--gcc/testsuite/gnat.dg/lto5_pkg.ads6
3 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/lto5.adb b/gcc/testsuite/gnat.dg/lto5.adb
new file mode 100644
index 00000000000..c36aae8fe5e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto5.adb
@@ -0,0 +1,9 @@
+-- { dg-do run }
+-- { dg-options "-flto" }
+
+with Lto5_Pkg;
+
+procedure Lto5 is
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/lto5_pkg.adb b/gcc/testsuite/gnat.dg/lto5_pkg.adb
new file mode 100644
index 00000000000..b5bf68ab942
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto5_pkg.adb
@@ -0,0 +1,6 @@
+package body Lto5_Pkg is
+ procedure d (a : t) is
+ begin
+ null;
+ end;
+end;
diff --git a/gcc/testsuite/gnat.dg/lto5_pkg.ads b/gcc/testsuite/gnat.dg/lto5_pkg.ads
new file mode 100644
index 00000000000..34d34926ea4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto5_pkg.ads
@@ -0,0 +1,6 @@
+pragma Eliminate (p, d);
+
+package Lto5_Pkg is
+ type t is tagged null record;
+ procedure d (a : t);
+end;