blob: 21660431c50dbf3e5d22e6d1324319ac87353592 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-- { dg-do run }
-- { dg-options "-Os" }
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Opt41_Pkg; use Opt41_Pkg;
procedure Opt41 is
R : Rec := (Five, To_Unbounded_String ("CONFIG"));
SP : String_Access := new String'(To_String (Rec_Write (R)));
RP : Rec_Ptr := new Rec'(Rec_Read (SP));
begin
if RP.D /= R.D then
raise Program_Error;
end if;
end;
|