aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/array14.adb
blob: 2d45cf10db4209fed73be349d3d036744bc67b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-- { dg-do compile }
-- { dg-options "-gnatws" }

with Array14_Pkg; use Array14_Pkg;

package body Array14 is

  package Nested is

    Length : constant SSE.Storage_Count := Length2;

    subtype Encoded_Index_Type is SSE.Storage_Count range 1 .. Length;
    subtype Encoded_Type is SSE.Storage_Array (Encoded_Index_Type'Range);

    procedure Encode (Input : in Integer; Output : out Encoded_Type);

  end;

  package body Nested is

    procedure Encode (Input : in Integer; Output : out Encoded_Type) is
    begin
      Encode2 (Input, Output);
    end;

  end;

  procedure Init is
    O : Nested.Encoded_Type;
    for O'Alignment use 4;
  begin
    null;
  end;

end Array14;