* gnat.dg/opt78.ad[sb]: New test.
From-SVN: r271545
This commit is contained in:
parent
8f5b46e99c
commit
02b7331304
@ -1,3 +1,7 @@
|
||||
2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/opt78.ad[sb]: New test.
|
||||
|
||||
2019-05-23 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
PR rtl-optimisation/64895
|
||||
|
16
gcc/testsuite/gnat.dg/opt78.adb
Normal file
16
gcc/testsuite/gnat.dg/opt78.adb
Normal file
@ -0,0 +1,16 @@
|
||||
-- { dg-do compile }
|
||||
-- { dg-options "-O" }
|
||||
|
||||
package body Opt78 is
|
||||
|
||||
procedure Proc (P : UC; Msg : String) is
|
||||
Default : UC := (1, "!");
|
||||
begin
|
||||
if P = Default then
|
||||
raise Program_Error;
|
||||
else
|
||||
raise Constraint_Error;
|
||||
end if;
|
||||
end;
|
||||
|
||||
end Opt78;
|
13
gcc/testsuite/gnat.dg/opt78.ads
Normal file
13
gcc/testsuite/gnat.dg/opt78.ads
Normal file
@ -0,0 +1,13 @@
|
||||
package Opt78 is
|
||||
|
||||
subtype Reasonable is Integer range 1..10;
|
||||
|
||||
type UC (D: Reasonable := 2) is record
|
||||
S: String (1 .. D) := "Hi";
|
||||
end record;
|
||||
|
||||
type AUC is access all UC;
|
||||
|
||||
procedure Proc (P : UC; Msg : String);
|
||||
|
||||
end Opt78;
|
Loading…
Reference in New Issue
Block a user