Summary: | [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" | ||
---|---|---|---|
Product: | gdb | Reporter: | Tom de Vries <vries> |
Component: | ada | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Tom de Vries
2023-09-26 15:11:41 UTC
Do you have Ada system debug info installed? I think there are various problems with overloading, and the system debuginfo can trigger them. Maybe this test can be rewritten to avoid this stuff. I'd like to fix overloading but I'm told it is hard. Haven't investigated yet for real. (In reply to Tom Tromey from comment #1) > Do you have Ada system debug info installed? No for both cases. And after I installed the debug info in both cases using: ... $ sudo zypper install gcc7-ada-debuginfo libada7-debuginfo ... and: ... $ zypper install gcc13-ada-debuginfo libada13-debuginfo ... there's no change in behaviour. It's true though that there is a difference in debug info, in one case the ada__strings__maps__Oeq subprogram is present in the exec, in the other case it's not. The info is coming from a-strmap.adb in gcc/ada/libgnat dir. The difference seems to be related to whether a-strmap.o is linked in or not. I've reproduced the problem with gcc 7.5.0, with this patch: ... diff --git a/gdb/testsuite/gdb.ada/widewide/foo.adb b/gdb/testsuite/gdb.ada/widewide/foo.adb index 858ae176418..04935005637 100644 --- a/gdb/testsuite/gdb.ada/widewide/foo.adb +++ b/gdb/testsuite/gdb.ada/widewide/foo.adb @@ -15,6 +15,8 @@ with Pck; use Pck; +with Ada.Strings.Maps; use Ada.Strings.Maps; + procedure Foo is Some_Easy : Wide_Wide_Character := 'J'; Some_Larger : Wide_Wide_Character := Wide_Wide_Character'Val(16#beef#); ... Patch adding KFAIL: https://sourceware.org/pipermail/gdb-patches/2023-October/202876.html The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=89238cfdbaadede9817f0848202f1d34f9885d94 commit 89238cfdbaadede9817f0848202f1d34f9885d94 Author: Tom de Vries <tdevries@suse.de> Date: Mon Oct 2 19:48:21 2023 +0200 [gdb/testsuite] Add KFAIL for PR ada/30908 With gcc 13.2.1, I run into a cluster of fails: ... FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" FAIL: gdb.ada/widewide.exp: print my_wws = " helo" FAIL: gdb.ada/widewide.exp: print my_ws = "wide" ... The problem is that the debug info contains information about function ada.strings.maps."=", and gdb uses it to implement the comparison. The function is supposed to compare two char sets, not strings, so gdb shouldn't use it. This is PR ada/30908. I don't see the same problem with gcc 7.5.0, because the exec doesn't contain the debug info for the function, because the corresponding object is not linked in. Adter adding "with Ada.Strings.Maps; use Ada.Strings.Maps;" to gdb.ada/widewide/foo.adb I run into the same problem with gcc 7.5.0. Add KFAILs for the PR. Tested on x86_64-linux: - openSUSE Leap 15.4 (using gcc 7.5.0), and - openSUSE Tumbleweed (using gcc 13.2.1). Approved-By: Tom Tromey <tom@tromey.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30908 I tried adding the with/use line and couldn't reproduce this with Fedora 38 gcc. I suspect this was fixed by commit d56fdf1b976d32762c780a0107b20e61ce768967 Author: Tom Tromey <tromey@adacore.com> Date: Tue Nov 28 14:26:56 2023 -0700 Refine Ada overload matching ... and this is a dup of bug#12607. However, I can't really be sure. (In reply to Tom Tromey from comment #7) > I tried adding the with/use line and couldn't reproduce > this with Fedora 38 gcc. > I suspect this was fixed by > > commit d56fdf1b976d32762c780a0107b20e61ce768967 > Author: Tom Tromey <tromey@adacore.com> > Date: Tue Nov 28 14:26:56 2023 -0700 > > Refine Ada overload matching > > ... and this is a dup of bug#12607. > However, I can't really be sure. Confirmed, that commit fixes the FAILs in gdb.ada/widewide.exp and gdb.ada/str_binop_equal.exp. Marking dup, and I'll submit a patch to remove the KFAILs. *** This bug has been marked as a duplicate of bug 12607 *** (In reply to Tom de Vries from comment #8) > ... and I'll submit a patch to remove the KFAILs. https://sourceware.org/pipermail/gdb-patches/2024-February/206859.html The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0dbca2abb94778204b2c972bcca3855cdbf9afba commit 0dbca2abb94778204b2c972bcca3855cdbf9afba Author: Tom de Vries <tdevries@suse.de> Date: Tue Feb 27 16:21:56 2024 +0100 [gdb/testsuite] Remove KFAIL for PR ada/30908 PR ada/30908 turns out to be a duplicate of PR ada/12607, which was fixed by commit d56fdf1b976 ("Refine Ada overload matching"). Remove the KFAILs for PR ada/30908. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30908 |