runtime: copy more of scheduler from Go 1.7 runtime
[official-gcc.git] / gcc / testsuite / gnat.dg / opt41.adb
blob21660431c50dbf3e5d22e6d1324319ac87353592
1 -- { dg-do run }
2 -- { dg-options "-Os" }
4 with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
5 with Opt41_Pkg; use Opt41_Pkg;
7 procedure 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));
11 begin
12 if RP.D /= R.D then
13 raise Program_Error;
14 end if;
15 end;