aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/sizetype4.adb
blob: b3ff6431961f9194243780b4a916254414e6acb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- { dg-do run }

procedure Sizetype4 is

   type Float_Array is array (Integer range <>) of Float;
   NoFloats : Float_Array (1 .. 0);

   procedure Q (Results : Float_Array := NoFloats) is

      type Reply_Msg is
         record
            Request_Id : Integer;
            Status     : Integer;
            Data       : Float_Array (Results'Range);
         end record;

   begin
      if Reply_Msg'Size /= 64 then
        raise Program_Error;
      end if;
   end;

begin
   Q;
end;