| 1 |
-- { dg-do run } |
| 2 |
|
| 3 |
procedure Aligned_Vla is |
| 4 |
|
| 5 |
type Table is array (Integer range <>) of Integer; |
| 6 |
for Table'Alignment use Long_Float'Alignment; |
| 7 |
|
| 8 |
K : constant := 1; |
| 9 |
Konstants : Table (1 .. 4) := (others => K); |
| 10 |
|
| 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; |
| 20 |
|
| 21 |
begin |
| 22 |
Check_Copy (Len => 4); |
| 23 |
end; |