]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.ada/fun_overload_menu/foo.adb
Update copyright year range in all GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.ada / fun_overload_menu / foo.adb
CommitLineData
42a4f53d 1-- Copyright 2015-2019 Free Software Foundation, Inc.
d72413e6
PMR
2--
3-- This program is free software; you can redistribute it and/or modify
4-- it under the terms of the GNU General Public License as published by
5-- the Free Software Foundation; either version 3 of the License, or
6-- (at your option) any later version.
7--
8-- This program is distributed in the hope that it will be useful,
9-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-- GNU General Public License for more details.
12--
13-- You should have received a copy of the GNU General Public License
14-- along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16procedure Foo is
17
18 type New_Integer is new Integer;
19 type Integer_Access is access Integer;
20
21 function F (I : Integer; A : Integer_Access) return Boolean is
22 begin
23 return True;
24 end F;
25
26 function F (I : New_Integer; A : Integer_Access) return Boolean is
27 begin
28 return False;
29 end F;
30
31 procedure P (I : Integer; A : Integer_Access) is
32 begin
33 null;
34 end P;
35
36 procedure P (I : New_Integer; A : Integer_Access) is
37 begin
38 null;
39 end P;
40
41 B1 : constant Boolean := F (Integer'(1), null); -- BREAK
42 B2 : constant Boolean := F (New_Integer'(2), null);
43
44begin
45 P (Integer'(3), null);
46 P (New_Integer'(4), null);
47end Foo;