[binutils-gdb] Update gdb.ada/attr_ref_and_charlit for gnat-llvm
Tom Tromey via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=770a40d77c0186a6b6bbd0cdc34210fed3c902e5 commit 770a40d77c0186a6b6bbd0cdc34210fed3c902e5 Author: Tom Tromey <[email protected]> Date: Thu Apr 23 07:27:15 2026 -0600 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: --- gdb/testsuite/gdb.ada/attr_ref_and_charlit/foo.adb | 7 +++++-- gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.adb | 21 +++++++++++++++++++++ gdb/testsuite/gdb.ada/attr_ref_and_charlit/pck.ads | 18 ++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) 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;