OSDN Git Service

* gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / test_8bitlong_overflow.adb
1 -- { dg-do run }
2 -- { dg-options "-gnato" }
3
4 procedure Test_8bitlong_Overflow is
5
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);
12
13       type A2 is array(T range <>) of T;
14       subtype SA2 is A2(LO..4*ONE);
15
16       ARRAY_AGGR : SA2 := SA2'(others=>LO + 1);
17
18       POS_1   : T := T'pos(LO*ONE);
19    end;
20
21    type T is new LONG_INTEGER range -1..10;
22    for T'size use 8;
23
24    package P is new G (T);
25
26 begin
27    null;
28 end;