1-- { dg-do run }
2-- { dg-options "-O" }
3
4with Opt27_Pkg;
5
6procedure Opt27 is
7
8    type Rec_T is record
9        A, B, C, D, E : Integer;
10    end record;
11
12    package List is new Opt27_Pkg (Rec_T);
13
14    My_List : List.List_T;
15
16    function Is_Match (Element : Rec_T; Template : Integer) return Boolean is
17    begin
18        return (Element.C = Template);
19    end;
20
21    function Find_Int is new List.Find_Elem (Integer, Is_Match);
22
23    Node : List.Node_T := Find_Int (10, My_List);
24
25begin
26    if not List.Is_Null (Node) then
27        raise Program_Error;
28    end if;
29end;
30