gcc/
[official-gcc.git] / gcc / testsuite / gnat.dg / aligned_vla.adb
blobbd3eb7158e53573773046a692a8d2c745b394814
1 -- { dg-do run }
3 procedure Aligned_Vla is
5 type Table is array (Integer range <>) of Integer;
6 for Table'Alignment use Long_Float'Alignment;
8 K : constant := 1;
9 Konstants : Table (1 .. 4) := (others => K);
11 procedure Check_Copy (Len : Integer) is
12 My_Konstants : Table (1 .. Len) := Konstants (1 .. 1 + Len - 1);
13 begin
14 for I in My_Konstants'Range loop
15 if My_Konstants (I) /= K then
16 raise Program_Error;
17 end if;
18 end loop;
19 end;
21 begin
22 Check_Copy (Len => 4);
23 end;