aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/forward_vla.adb
blob: 515112b83e347cf89530fdd50d733f53ff42f841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- { dg-do compile }
-- { dg-options "-O2 -gnatp -Wuninitialized" }

procedure Forward_Vla is

   function N return Natural is begin return 1; end;

   type Sequence;
   type Sequence_Access is access all Sequence;

   Ptr : Sequence_Access := null;  -- freeze access type

   Sequence_Length : Natural := N;
   type Sequence is array (1 .. Sequence_Length) of Natural;

   Seq : Sequence;
begin
   Seq (1) := 0;
end;