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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gnat.dg/] [empty_vector_length.adb] - Rev 304

Compare with Previous | Blame | View Log

--  { dg-do run }
--  { dg-options "-gnatp" }
 
procedure Empty_Vector_Length is
 
   type Vector is array (Integer range <>) of Integer;
 
   function Empty_Vector return Vector is
   begin
      return (2 .. Integer'First => 0);
   end;
 
   My_Vector : Vector := Empty_Vector;
   My_Length : Integer := My_Vector'Length;
begin
   if My_Length /= 0 then
      raise Program_Error;
   end if;
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.