From: Tom Tromey Date: Thu, 23 Apr 2026 13:27:15 +0000 (-0600) Subject: Update gdb.ada/attr_ref_and_charlit for gnat-llvm X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=770a40d77c0186a6b6bbd0cdc34210fed3c902e5;p=thirdparty%2Fbinutils-gdb.git Update gdb.ada/attr_ref_and_charlit for gnat-llvm 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. --- 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 . +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 . + +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 . + +package Pck is + procedure Do_Nothing (S : String); +end Pck;