* [pushed] Update gdb.ada/attr_ref_and_charlit for gnat-llvm
@ 2026-04-23 18:37 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2026-04-23 18:37 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
This patch changes the gdb.ada/attr_ref_and_charlit test to come
closer to passing with gnat-llvm. This mostly works around some
existing problems in gnat-llvm, but since the changes are harmless and
help reduce the noise in the test results, I thought it would be
better to land this.
Because this is Ada-specific, I am checking this in.
---
.../gdb.ada/attr_ref_and_charlit/foo.adb | 7 +++++--
.../gdb.ada/attr_ref_and_charlit/pck.adb | 21 +++++++++++++++++++
.../gdb.ada/attr_ref_and_charlit/pck.ads | 18 ++++++++++++++++
3 files changed, 44 insertions(+), 2 deletions(-)
create mode 100644 gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.adb
create mode 100644 gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.ads
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb
index fe0cb1b14b2..d2754b83747 100644
--- a/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb
@@ -13,10 +13,13 @@
-- 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
- procedure P (S : String) is
+ procedure P (In_Val : String) is
+ S : String := In_Val;
begin
- null; -- BREAK
+ Do_Nothing (S); -- BREAK
end P;
begin
P ((2 => 'a', 3 => 'b'));
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.adb b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.adb
new file mode 100644
index 00000000000..82545b7d989
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.adb
@@ -0,0 +1,21 @@
+-- Copyright 2026 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 (S : String) is
+ begin
+ null;
+ end Do_Nothing;
+end Pck;
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.ads b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.ads
new file mode 100644
index 00000000000..d682068f6f1
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.ads
@@ -0,0 +1,18 @@
+-- Copyright 2026 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 Pck is
+ procedure Do_Nothing (S : String);
+end Pck;
base-commit: 8dc535c59fdbcf99e28703425e5c1c711e63a1f1
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-23 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-23 18:37 [pushed] Update gdb.ada/attr_ref_and_charlit for gnat-llvm Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox