PR ipa/83051
[official-gcc.git] / gcc / testsuite / gnat.dg / array5.adb
blob72a5df821e6cc0637af9e134d64d53ce51b5f1e2
1 -- { dg-do run }
2 -- { dg-options "-O" }
4 procedure Array5 is
6 type myint is range 0 .. 100_000;
7 Bla : constant myint := 359;
9 type my_array is array (1 .. 2) of myint;
11 type item is record
12 Length : Integer;
13 Content : my_array;
14 end record;
16 procedure create_item (M : out item) is
17 begin
18 M.Length := 1;
19 M.Content := (others => Bla);
20 end;
22 Var : item;
24 begin
25 create_item (Var);
27 if Var.Length = 1
28 and then Var.Content (1) = Bla
29 then
30 null;
31 else
32 raise Program_Error;
33 end if;
34 end;