aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/null_overload
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.ada/null_overload')
-rw-r--r--gdb/testsuite/gdb.ada/null_overload/foo.adb4
-rw-r--r--gdb/testsuite/gdb.ada/null_overload/pck.adb23
-rw-r--r--gdb/testsuite/gdb.ada/null_overload/pck.ads22
3 files changed, 48 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/null_overload/foo.adb b/gdb/testsuite/gdb.ada/null_overload/foo.adb
index 002238f..55d3fd6 100644
--- a/gdb/testsuite/gdb.ada/null_overload/foo.adb
+++ b/gdb/testsuite/gdb.ada/null_overload/foo.adb
@@ -13,6 +13,8 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+with pck; use pck;
+
procedure Foo is
type R_Type is null record;
@@ -38,5 +40,5 @@ procedure Foo is
U_Ptr : U_P_T := null;
begin
- null; -- START
+ Do_Nothing (U_Ptr'Address); -- START
end Foo;
diff --git a/gdb/testsuite/gdb.ada/null_overload/pck.adb b/gdb/testsuite/gdb.ada/null_overload/pck.adb
new file mode 100644
index 0000000..95bd90a
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/null_overload/pck.adb
@@ -0,0 +1,23 @@
+-- Copyright 2020-2025 Free Software Foundation, Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package body Pck is
+
+ procedure Do_Nothing (A : System.Address) is
+ begin
+ null;
+ end Do_Nothing;
+
+end Pck;
diff --git a/gdb/testsuite/gdb.ada/null_overload/pck.ads b/gdb/testsuite/gdb.ada/null_overload/pck.ads
new file mode 100644
index 0000000..114aee0
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/null_overload/pck.ads
@@ -0,0 +1,22 @@
+-- Copyright 2020-2025 Free Software Foundation, Inc.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+with System;
+
+package Pck is
+
+ procedure Do_Nothing (A : System.Address);
+
+end Pck;