1-- { dg-excess-errors "cannot generate code" }
2
3package Aggr4_Pkg is
4
5   function F return Integer;
6
7   type Rec1 is tagged record
8      I : Integer;
9   end record;
10
11   Zero : constant Rec1 := (I => F);
12
13   type Enum is (One, Two);
14
15   type Rec2 (D : Enum := One) is record
16      case D is
17         when One => Value : Rec1;
18         when others => null;
19      end case;
20   end record;
21
22   type Rec3 is record
23      Data : Rec2;
24   end record;
25
26end Aggr4_Pkg;
27