Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [pushed] Update gdb.ada/attr_ref_and_charlit for gnat-llvm
Date: Thu, 23 Apr 2026 12:37:11 -0600	[thread overview]
Message-ID: <20260423183711.2815933-1-tromey@adacore.com> (raw)

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


                 reply	other threads:[~2026-04-23 18:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260423183711.2815933-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox