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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [empty_vector_length.adb] - Blame information for rev 774

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

Line No. Rev Author Line
1 696 jeremybenn
--  { dg-do run }
2
--  { dg-options "-gnatp" }
3
 
4
procedure Empty_Vector_Length is
5
 
6
   type Vector is array (Integer range <>) of Integer;
7
 
8
   function Empty_Vector return Vector is
9
   begin
10
      return (2 .. Integer'First => 0);
11
   end;
12
 
13
   My_Vector : Vector := Empty_Vector;
14
   My_Length : Integer := My_Vector'Length;
15
begin
16
   if My_Length /= 0 then
17
      raise Program_Error;
18
   end if;
19
end;

powered by: WebSVN 2.1.0

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