Increase timeout factor for hppa*-*-* in gcc.dg/long_branch.c
[official-gcc.git] / gcc / testsuite / gnat.dg / generic_comp.adb
blob8c7b16f8aae58baf33482f7ef6bf41c3b4d73eda
1 -- { dg-do run }
3 procedure Generic_Comp is
5 generic
6 type Element_Type is private;
7 type Index_Type is (<>);
8 type Array_Type is array (Index_Type range <>) of Element_Type;
9 with function ">" (Left, Right : Element_Type) return Boolean is <>;
10 procedure Gen (Data: in out Array_Type);
12 procedure Gen (Data: in out Array_Type) is
13 begin
14 if not (Data'Length > 1)
15 or else not (Integer'(Data'Length) > 1)
16 or else not Standard.">" (Data'Length, 1)
17 or else not Standard.">" (Integer'(Data'Length), 1)
18 then
19 raise Program_Error;
20 end if;
21 end;
23 type My_Array is array (Positive range <>) of Integer;
25 function Less_Than (L, R : Integer) return Boolean is
26 begin
27 return L < R;
28 end;
30 procedure Chk_Down is new Gen (Element_Type => Integer,
31 Index_Type => Positive,
32 Array_Type => My_Array,
33 ">" => Less_Than);
35 Data : My_Array (1 .. 2);
37 begin
38 Chk_Down (Data);
39 end;