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

Tom de Vries tdevries@suse.de
Fri Sep 11 13:59:17 GMT 2020


On 8/27/20 8:04 PM, Pedro Alves wrote:
> On 8/27/20 5:18 PM, Gary Benson wrote:
>> Pedro Alves wrote:
>>> On 8/27/20 4:07 PM, Gary Benson wrote:
>>>> 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...?
>>>
>>> I'm adjusting / fixing the testcase at the same time as I'm
>>> patching GDB.  So for now, do nothing.
>>
>> Awesome, thank you.
> 
> I've sent it now, here:
> 
>  [PATCH] Reject ambiguous C++ field accesses
>  https://sourceware.org/pipermail/gdb-patches/2020-August/171526.html
> 

With the gdb 10 branching planned to happen soon, I've marked these
FAILs as KFAIL, in order to make sure that these won't show up as
"unexpected failure" in the gdb 10 release.

Thanks,
- Tom


More information about the Gdb-patches mailing list