summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/discr16_g.ads
blob: f163f75d9201cb67859de6ff83b2cf8fcc1f4df3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
generic

  type T is (<>);
  with function MAX_ADD(X : T; I : INTEGER) return T;

package Discr16_G is

  LO : T := T'val(T'pos(T'first));
  HI : T := T'val(T'pos(MAX_ADD(LO, 15)));

  type A2 is array(T range <>) of T;

  type R2(D : T) is
  record
    C : A2(LO..D);
  end record;

end;