Debian Codegraph @

gcc/testsuite/gnat.dg/array19.adb

raw
1 -- { dg-do compile }
2
3 package body Array19 is
4
5 function N return Integer is
6 begin
7 return 1;
8 end;
9
10 type Array_Type is array (1 .. N) of Float;
11
12 type Enum is (One, Two);
13
14 type Rec (D : Enum := Enum'First) is record
15 case D is
16 when One => null;
17 when Two => A : Array_Type;
18 end case;
19 end record;
20
21 procedure Proc is
22
23 R : Rec;
24
25 function F return Array_Type is
26 begin
27 return (others => 0.0);
28 end F;
29
30 begin
31 R.A := F;
32 end;
33
34 end Array19;