public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29238] New: [gcc 4.8] FAIL: gdb.cp/ambiguous.exp: all vars: print jv
@ 2022-06-10 12:01 vries at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: vries at gcc dot gnu.org @ 2022-06-10 12:01 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29238
           Summary: [gcc 4.8] FAIL: gdb.cp/ambiguous.exp: all vars: print
                    jv
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With gcc 4.8, I run into:
...
FAIL: gdb.cp/ambiguous.exp: all vars: print jv
FAIL: gdb.cp/ambiguous.exp: all vars: print jva1
FAIL: gdb.cp/ambiguous.exp: all vars: print jva2
FAIL: gdb.cp/ambiguous.exp: all vars: print jva1v
...

First in more detail:
...
(gdb) print jv^M
$10 = {<KV> = {<A1> = {x = 1, y = 2}, _vptr.KV = 0x400d38 <vtable for JV+24>, i
= 3}, <LV> = {_vptr.LV = 0x400d50, z = 4}, jv = 5}^M
(gdb) FAIL: gdb.cp/ambiguous.exp: all vars: print jv
...

Looking at the same test with gcc 7.5.0, we have instead:
...
(gdb) print jv^M
$10 = {<KV> = {<A1> = {x = 1, y = 2}, _vptr.KV = 0x400c20 <vtable for JV+24>, i
= 3}, <LV> = {_vptr.LV = 0x400c38 <VTT for JV>, z = 4}, jv = 5}^M
(gdb) PASS: gdb.cp/ambiguous.exp: all vars: print jv
...

So, the difference seems to be:
...
_vptr.LV = 0x400d50
...
vs:
...
_vptr.LV = 0x400c38 <VTT for JV>
...

Looking at the nm -C output with gcc7, we have indeed:
...
$ nm -C outputs/gdb.cp/ambiguous/ambiguous | grep "VTT for JV$"
0000000000400c38 V VTT for JV
...
but with gcc-4.8:
...
$ nm -C outputs/gdb.cp/ambiguous/ambiguous | grep "VTT for JV$"
0000000000400d60 V VTT for JV
...
which is at a different address.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-10 12:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 12:01 [Bug c++/29238] New: [gcc 4.8] FAIL: gdb.cp/ambiguous.exp: all vars: print jv vries 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).