[PATCH v2] Enable gdb.cp/ambiguous.exp with GCC and clang

Gary Benson gbenson@redhat.com
Thu Aug 27 15:07:41 GMT 2020


Pedro Alves wrote:
> On 8/27/20 11:39 AM, Gary Benson wrote:
> > Luis Machado wrote:
> > > I get the following, under Ubuntu 18.04 (GCC 7.x) with this commit...
> > >
> > > FAIL: gdb.cp/ambiguous.exp: print x.x
> > > FAIL: gdb.cp/ambiguous.exp: print n.x
> > > FAIL: gdb.cp/ambiguous.exp: print j.x
> > > FAIL: gdb.cp/ambiguous.exp: print jva1.x
> > > FAIL: gdb.cp/ambiguous.exp: print jva2.x
> > > FAIL: gdb.cp/ambiguous.exp: print (A1)j
> > > FAIL: gdb.cp/ambiguous.exp: print (A1)jva1
> > >
> > > Is the test really supposed to run with older GCC's?
> > 
> > Maybe not.  Though, I don't know what version of GCC it ought to
> > start working on, so it's hard to know what to do.  I could leave
> > the "-w" in for GCC < 10, and add an extra check to make it bail
> > out for GCC <= your version, Luis?  With a suitable comment to
> > mention that that's not set in stone?
> 
> I'm seeing it fail with GCC 9 and clang 10 as well.
> 
> Actually, the testcase can't be working _anywhere_.  It's testing a
> feature that is gone from GDB.
[snip]
> ...search_struct_field does not handle the ambiguous field
> case nowadays.  Somehow it got lost over the years.
> That seems like a regression.  I wrote up a patch that adds
> it back (though different), but it exposed other latent
> bugs...  Sigh.  I'll post it soon.

So the test would start passing if that patch was added?
Should we leave the test alone, or XFAIL the cases that
fail, or...?

Cheers,
Gary

-- 
Gary Benson - he / him / his
Principal Software Engineer, Red Hat



More information about the Gdb-patches mailing list