OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gnat.dg/] [varsize_temp.adb] - Blame information for rev 455

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- { dg-do compile }
2
 
3
procedure Varsize_Temp (Nbytes : Natural) is
4
 
5
   type Message_T (Length : Natural) is record
6
      case Length is
7
         when 0 => null;
8
         when others => Id : Natural;
9
      end case;
10
   end record;
11
 
12
   type Local_Message_T is new Message_T (Nbytes);
13
 
14
   function One_message return Local_Message_T is
15
      M : Local_Message_T;
16
   begin
17
      if M.Length > 0 then
18
         M.Id := 1;
19
      end if;
20
      return M;
21
   end;
22
 
23
   procedure Process (X : Local_Message_T) is begin null; end;
24
 
25
begin
26
   Process (One_Message);
27
end;
28
 
29
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.