generic.texi (ANNOTATE_EXPR): Document 3rd operand.
[gcc.git] / gcc / testsuite / gnat.dg / discr21.adb
1 -- { dg-do compile }
2 -- { dg-options "-gnatws -O3" }
3
4 with Discr21_Pkg; use Discr21_Pkg;
5
6 package body Discr21 is
7
8 type Index is new Natural range 0 .. 100;
9
10 type Arr is array (Index range <> ) of Position;
11
12 type Rec(Size : Index := 1) is record
13 A : Arr(1 .. Size);
14 end record;
15
16 Data : Rec;
17
18 function To_V(pos : Position) return VPosition is
19 begin
20 return To_Position(pos.x, pos.y, pos.z);
21 end;
22
23 procedure Read(Data : Rec) is
24 pos : VPosition := To_V (Data.A(1));
25 begin
26 null;
27 end;
28
29 procedure Test is
30 begin
31 Read (Data);
32 end;
33
34 end Discr21;