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] - Rev 154

Compare with Previous | Blame | View Log

-- { dg-do compile }
 
procedure Varsize_Temp (Nbytes : Natural) is
 
   type Message_T (Length : Natural) is record
      case Length is
         when 0 => null;
         when others => Id : Natural;
      end case;
   end record;
 
   type Local_Message_T is new Message_T (Nbytes);
 
   function One_message return Local_Message_T is
      M : Local_Message_T;
   begin
      if M.Length > 0 then
         M.Id := 1;
      end if;
      return M;
   end;
 
   procedure Process (X : Local_Message_T) is begin null; end;
 
begin
   Process (One_Message);
end;
 
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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