runtime: copy more of scheduler from Go 1.7 runtime
[official-gcc.git] / gcc / testsuite / gnat.dg / slice4.adb
bloba7890a2106812525392453bfdac0c9c6a47101b3
1 -- { dg-do run }
3 procedure Slice4 is
5 type Varray is array (1 .. 1) of Natural; -- SImode
7 type Rec is record
8 Values : Varray;
9 end record;
11 type Sample is record
12 Maybe : Boolean;
13 R : Rec;
14 end record;
15 pragma Pack (Sample);
17 function Match (X, Y: Sample; Length : Positive) return Boolean is
18 begin
19 return X.R.Values (1 .. Length) = Y.R.Values (1 .. Length);
20 end;
22 X, Y : Sample := (Maybe => True, R => (Values => (1 => 1)));
23 begin
24 X.Maybe := False;
25 if not Match (X, Y, 1) then
26 raise Program_Error;
27 end if;
28 end;