2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gnat.dg / sizetype2.adb
blob4593936c8261c411c61b7e06e5699a11a0960eaf
1 -- { dg-do run }
3 procedure Sizetype2 is
5 function Ident_Int (X : Integer) return Integer is
6 begin
7 return X;
8 end;
10 type A is array (Integer range <>) of Boolean;
11 subtype T1 is A (Ident_Int (- 6) .. Ident_Int (Integer'Last - 4));
12 subtype T2 is A (- 6 .. Ident_Int (Integer'Last - 4));
13 subtype T3 is A (Ident_Int (- 6) .. Integer'Last - 4);
15 begin
16 if T1'Size /= 17179869200 then
17 raise Program_Error;
18 end if;
20 if T2'Size /= 17179869200 then
21 raise Program_Error;
22 end if;
24 if T3'Size /= 17179869200 then
25 raise Program_Error;
26 end if;
27 end;