PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / test_8bitlong_overflow.adb
blobb22c87170e558a6f80c7dc059616c932c985b872
1 -- { dg-do run }
2 -- { dg-options "-gnato" }
4 procedure Test_8bitlong_Overflow is
6 pragma Unsuppress (Overflow_Check);
7 generic
8 type T is range <>;
9 package G is
10 LO : T := T'first;
11 ONE : T := T(1);
13 type A2 is array(T range <>) of T;
14 subtype SA2 is A2(LO..4*ONE);
16 ARRAY_AGGR : SA2 := SA2'(others=>LO + 1);
18 POS_1 : T := T'pos(LO*ONE);
19 end;
21 type T is new LONG_INTEGER range -1..10;
22 for T'size use 8;
24 package P is new G (T);
26 begin
27 null;
28 end;