public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
@ 2023-09-26 15:11 vries at gcc dot gnu.org
  2023-09-26 15:37 ` [Bug ada/30908] " tromey at sourceware dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-26 15:11 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

            Bug ID: 30908
           Summary: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp:
                    print my_str = "ABCD"
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ada
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

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"
...

I Investigated the middle one, using:
...
+gdb_test "set debug expr 1"                                                    
 gdb_test "print my_wws = \" helo\"" " = true"                                  
+gdb_test "set debug expr 0"                                                    
...

With gcc 7.5.0 I get:
...
(gdb) print my_wws = " helo"^M
Operation: BINOP_EQUAL^M
 Operation: BINOP_EQUAL^M
 Operation: OP_VAR_VALUE^M
  Block symbol:^M
   Symbol: my_wws^M
    Type: array (1 .. 5) of wide_wide_character^M
   Block: 0x2e25f70^M
 Operation: OP_STRING^M
  String:  helo^M
$7 = true^M
(gdb) PASS: gdb.ada/widewide.exp: print my_wws = " helo"
...

With gcc 13.2.1 I get:
...
(gdb) print my_wws = " helo"^M
Operation: OP_FUNCALL^M
 Operation: OP_VAR_VALUE^M
  Block symbol:^M
   Symbol: ada.strings.maps."="^M
    Type: function (a1: <ref> ada.strings.maps.character_set; a2: <ref>
ada.strings.maps.character_set) return boolean^M
   Block: 0x3a9e450^M
 Vector:^M
  Operation: OP_VAR_VALUE^M
   Block symbol:^M
    Symbol: my_wws^M
     Type: array (1 .. 5) of wide_wide_character^M
    Block: 0x3855d00^M
  Operation: OP_STRING^M
   String:  helo^M
$7 = false^M
(gdb) FAIL: gdb.ada/widewide.exp: print my_wws = " helo"
...

I don't know what's the cause of the difference, but I'm tentatively
classifying this as an ada problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
@ 2023-09-26 15:37 ` tromey at sourceware dot org
  2023-09-26 17:14 ` vries at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-09-26 15:37 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
  2023-09-26 15:37 ` [Bug ada/30908] " tromey at sourceware dot org
@ 2023-09-26 17:14 ` vries at gcc dot gnu.org
  2023-09-26 23:31 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-26 17:14 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
  2023-09-26 15:37 ` [Bug ada/30908] " tromey at sourceware dot org
  2023-09-26 17:14 ` vries at gcc dot gnu.org
@ 2023-09-26 23:31 ` vries at gcc dot gnu.org
  2023-09-27  6:58 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-26 23:31 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-09-26 23:31 ` vries at gcc dot gnu.org
@ 2023-09-27  6:58 ` vries at gcc dot gnu.org
  2023-10-01 13:26 ` vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-27  6:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
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#);
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-09-27  6:58 ` vries at gcc dot gnu.org
@ 2023-10-01 13:26 ` vries at gcc dot gnu.org
  2023-10-02 17:48 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2023-10-01 13:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch adding KFAIL:
https://sourceware.org/pipermail/gdb-patches/2023-October/202876.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-10-01 13:26 ` vries at gcc dot gnu.org
@ 2023-10-02 17:48 ` cvs-commit at gcc dot gnu.org
  2024-02-26 18:38 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-02 17:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-10-02 17:48 ` cvs-commit at gcc dot gnu.org
@ 2024-02-26 18:38 ` tromey at sourceware dot org
  2024-02-27 11:14 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2024-02-26 18:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-02-26 18:38 ` tromey at sourceware dot org
@ 2024-02-27 11:14 ` vries at gcc dot gnu.org
  2024-02-27 11:23 ` vries at gcc dot gnu.org
  2024-02-27 15:21 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-27 11:14 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
(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 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-02-27 11:14 ` vries at gcc dot gnu.org
@ 2024-02-27 11:23 ` vries at gcc dot gnu.org
  2024-02-27 15:21 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2024-02-27 11:23 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #9 from Tom de Vries <vries at gcc dot gnu.org> ---
(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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug ada/30908] [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
  2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-02-27 11:23 ` vries at gcc dot gnu.org
@ 2024-02-27 15:21 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-27 15:21 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30908

--- Comment #10 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
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

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-02-27 15:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 15:11 [Bug ada/30908] New: [gdb/ada, gcc 13] FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD" vries at gcc dot gnu.org
2023-09-26 15:37 ` [Bug ada/30908] " tromey at sourceware dot org
2023-09-26 17:14 ` vries at gcc dot gnu.org
2023-09-26 23:31 ` vries at gcc dot gnu.org
2023-09-27  6:58 ` vries at gcc dot gnu.org
2023-10-01 13:26 ` vries at gcc dot gnu.org
2023-10-02 17:48 ` cvs-commit at gcc dot gnu.org
2024-02-26 18:38 ` tromey at sourceware dot org
2024-02-27 11:14 ` vries at gcc dot gnu.org
2024-02-27 11:23 ` vries at gcc dot gnu.org
2024-02-27 15:21 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).