Add testcase for PR lto/119792
It demonstrates a serious LTO breakage for the Ada language. gcc/testsuite/ PR lto/119792 * gnat.dg/lto29.adb: New test. * gnat.dg/lto29_pkg.ads: New helper.
This commit is contained in:
parent
d72b4e9f78
commit
ec4bf5b6c2
2 changed files with 24 additions and 0 deletions
9
gcc/testsuite/gnat.dg/lto29.adb
Normal file
9
gcc/testsuite/gnat.dg/lto29.adb
Normal file
|
@ -0,0 +1,9 @@
|
|||
-- { dg-do run }
|
||||
-- { dg-options "-O -flto" { target lto } }
|
||||
|
||||
with Lto29_Pkg;
|
||||
|
||||
procedure Lto29 is
|
||||
begin
|
||||
null;
|
||||
end;
|
15
gcc/testsuite/gnat.dg/lto29_pkg.ads
Normal file
15
gcc/testsuite/gnat.dg/lto29_pkg.ads
Normal file
|
@ -0,0 +1,15 @@
|
|||
with Ada.Strings.Bounded;
|
||||
|
||||
package Lto29_Pkg is
|
||||
|
||||
package M is new Ada.Strings.Bounded.Generic_Bounded_Length (10);
|
||||
|
||||
type T is new M.Bounded_String;
|
||||
|
||||
Null_T : constant T;
|
||||
|
||||
private
|
||||
|
||||
Null_T : constant T := To_Bounded_String ("");
|
||||
|
||||
end Lto29_Pkg;
|
Loading…
Add table
Reference in a new issue