OSDN Git Service

* gcc.dg/march.c: Ignore a note for some targets.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / empty_vector_length.adb
1 --  { 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;