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