public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug ada/30726] [gdb/ada] FAIL: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
Date: Thu, 07 Sep 2023 19:39:50 +0000	[thread overview]
Message-ID: <bug-30726-4717-REJoJF9hPl@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30726-4717@http.sourceware.org/bugzilla/>

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

--- Comment #10 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=ef136c7fa165cf3ee75c37d41561be8a7bdc89bd

commit ef136c7fa165cf3ee75c37d41561be8a7bdc89bd
Author: Tom de Vries <tdevries@suse.de>
Date:   Thu Sep 7 21:39:42 2023 +0200

    [gdb/ada] Move identical enums handling later

    When running test-case gdb.ada/arr_acc_idx_w_gap.exp with target board
    cc-with-dwz, I run into:
    ...
    (gdb) print enum_with_gaps'enum_rep(lit3)^M
    'Enum_Rep requires argument to have same type as enum^M
    (gdb) FAIL: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
    ...

    With target_board unix, we have instead:
    ...
    (gdb) print enum_with_gaps'enum_rep(lit3)^M
    $16 = 13^M
    (gdb) PASS: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
    ...

    Conversely, when I add this test to the test-case:
    ...
         gdb_test "print enum_with_gaps'enum_rep(lit3)" " = 13" \
            "enum_rep"
    +    gdb_test "print enum_subrange'enum_rep(lit3)" " = 13" \
    +       "other enum_rep"
    ...
    the extra test passes with target board cc-with-dwz, but fails with target
    board unix.

    The problem is here in remove_extra_symbols:
    ...
      if (symbols_are_identical_enums (syms))
        syms.resize (1);
    ...
    where one of the two identical enums is picked before the enum_rep handling
    can resolve lit3 to one of the two.

    Fix this by moving the code to ada_resolve_variable.

    Tested on x86_64-linux.

    Approved-By: Tom Tromey <tom@tromey.com>

    PR ada/30726
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30726

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

  parent reply	other threads:[~2023-09-07 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 13:06 [Bug ada/30726] New: [gdb/ada, cc-with-dwz] " vries at gcc dot gnu.org
2023-08-06 14:28 ` [Bug ada/30726] " vries at gcc dot gnu.org
2023-08-06 14:39 ` vries at gcc dot gnu.org
2023-08-06 15:05 ` tromey at sourceware dot org
2023-08-07  1:08 ` vries at gcc dot gnu.org
2023-09-06 13:04 ` vries at gcc dot gnu.org
2023-09-06 13:15 ` [Bug ada/30726] [gdb/ada] " vries at gcc dot gnu.org
2023-09-06 14:58 ` vries at gcc dot gnu.org
2023-09-06 15:27 ` vries at gcc dot gnu.org
2023-09-06 15:56 ` vries at gcc dot gnu.org
2023-09-06 18:02 ` vries at gcc dot gnu.org
2023-09-07 19:39 ` cvs-commit at gcc dot gnu.org [this message]
2023-09-07 19:41 ` vries at gcc dot gnu.org

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=bug-30726-4717-REJoJF9hPl@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).