summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/aggr16_pkg.ads
blob: 8bacbc9b04fbae6da8c4244f849e2cb0434d5eb1 (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
package Aggr16_Pkg is

  type Time_Type is (A, B);

  type Time (D : Time_Type := A) is private;

  Null_Time : constant Time;

private

  type Hour is record
    I1 : Integer;
    I2 : Integer;
  end record;

  type Time (D : Time_Type := A) is record
    case D is
      when A =>
        A_Time : Integer;
      when B =>
        B_Time : Hour;
    end case;
  end record;

  Null_Time : constant Time := (A, 0);

end Aggr16_Pkg;