public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug ada/30726] [gdb/ada, cc-with-dwz] FAIL: gdb.ada/arr_acc_idx_w_gap.exp: enum_rep
Date: Wed, 06 Sep 2023 13:04:04 +0000	[thread overview]
Message-ID: <bug-30726-4717-PzlN8XGCIa@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 #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by:
...
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index c0cc512bfa3..5b8b54331b7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5104,7 +5104,8 @@ remove_extra_symbols (std::vector<struct block_symbol>
&syms)
      to ask the user to disambiguate anyways.  And if we have to
      present a multiple-choice menu, it's less confusing if the list
      isn't missing some choices that were identical and yet distinct.  */
-  if (symbols_are_identical_enums (syms))
+  if (false && symbols_are_identical_enums (syms))
     syms.resize (1);
 }
...

Here in remove_extra_symbols we randomly throw away one of the two enums.

In the cc-with-dwz variant, we throw away the wrong one because the order in
which the symbols is found has changed.

If there are two symbols remaining after remove_extra_symbols,
write_var_or_type produces an ambiguous var, which then allows the ada_pop
here:
...
        |       type_prefix TICK_ENUM_REP '(' exp ')'
                        {
                          operation_up arg = ada_pop (true, $1);
                          pstate->push_new<ada_atr_enum_rep_operation>
                            ($1, std::move (arg));
                        }
...
to resolve the literal using the $1 context_type.

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

  parent reply	other threads:[~2023-09-06 13:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06 13:06 [Bug ada/30726] New: " 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 [this message]
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
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-PzlN8XGCIa@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).