Debian Codegraph @

gcc/testsuite/gnat.dg/warn16.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-gnatwa" }
3
4 procedure Warn16 is
5
6 package Define is
7 type Key_Type is record
8 Value : Integer := 0;
9 end record;
10
11 function "=" (Left : in Key_Type;
12 Right : in Key_Type)
13 return Boolean;
14 end;
15 package body Define is
16 function "=" (Left : in Key_Type;
17 Right : in Key_Type)
18 return Boolean is
19 begin
20 return Left.Value = Right.Value;
21 end;
22 end;
23
24 generic
25 type Key_Type is private;
26 with function "=" (Left : in Key_Type;
27 Right : in Key_Type)
28 return Boolean;
29 package Oper is end;
30
31 use type Define.Key_Type; -- !!!
32
33 package Inst is new Oper (Key_Type => Define.Key_Type,
34 "=" => "=");
35 pragma Unreferenced (Inst);
36 begin
37 null;
38 end;