OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / sizetype2.adb
1 -- { dg-do run }
2
3 procedure Sizetype2 is
4
5   function Ident_Int (X : Integer) return Integer is
6   begin
7      return X;
8   end;
9
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);
14
15 begin
16   if T1'Size /= 17179869200 then
17     raise Program_Error;
18   end if;
19
20   if T2'Size /= 17179869200 then
21     raise Program_Error;
22   end if;
23
24   if T3'Size /= 17179869200 then
25     raise Program_Error;
26   end if;
27 end;