PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / discr16.adb
blobc4c24fd4d9c1481025057b3be907570ec3006c9a
1 -- { dg-do compile }
3 with Discr16_G;
4 with Discr16_Cont; use Discr16_Cont;
6 procedure Discr16 is
8 generic
9 type T is (<>);
10 function MAX_ADD_G(X : T; I : INTEGER) return T;
12 function MAX_ADD_G(X : T; I : INTEGER) return T is
13 begin
14 return T'val(T'pos(X) + LONG_INTEGER(I));
15 end;
17 function MAX_ADD is new MAX_ADD_G(ES6A);
19 package P is new Discr16_G(ES6A, MAX_ADD);
21 begin
22 null;
23 end;