This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Mark some tests as XFAIL/UNSUPPORTED hidden due to GCC's omission of typedefs in inheritance.


On Wed, Apr 23, 2014 at 3:46 PM, Doug Evans <dje@google.com> wrote:
> David Blaikie writes:
>  > gdb.cp/impl-this.exp is testing the ability to scope names within a
>  > class and includes cases where the base class was specified via a
>  > typedef.
>  >
>  > Due to GCC's PR14819 these tests weren't actually testing this case -
>  > GCC produces the same debug info regardless of whether there's a
>  > typedef used in the base specifier.
>  >
>  > Clang correctly produces the typedef debug info for the base type and
>  > exposes a variety of failures/limitations in these test cases.
>  >
>  > The attached patch updates the tests to flag these cases as
>  > unsupported under GCC and xfail as appropriate under Clang.
>  > commit 7fa92f9a15f440129dd5a989511f3bbda646afa5
>  > Author: David Blaikie <dblaikie@gmail.com>
>  > Date:   Sun Apr 13 11:15:44 2014 -0700
>  >
>  >     Mark some tests as XFAIL/UNSUPPORTED hidden due to GCC's omission of typedefs in inheritance.
>  >
>  >     gdb/testsuite/
>  >      * gdb.cp/impl-this.exp: Mark several tests XFAIL/UNSUPPORTED due to
>  >      PR16841 and GCC PR60833
>
> There are several calls to setup_kfail passing gdb/x and gdb/y.
> x and y need to be fixed.

Ah, right, sorry - jumbled up a few bug numbers. The GDB bug is
PR16841, I've updated all the kfails (both 'x' and 'y' - at first I'd
thought they might be separate bugs, but I'm guessing they're the same
one - I've mentioned the 'y' case down the bottom of PR16841,
manifesting as "Cannot access memory at address 0x0") to refer to that
GDB PR.

> According to gdb/testsuite/README I think (!) setup_xfail should
> be used here instead of setup_kfail, since the problem originates
> with gcc.
>
> kfail = known gdb problem
> xfail = known environment problem (e.g. compiler)

Yep, that's my understanding as well - it's just that in this case
these are actually GDB problems, so far as I can see, and should
correctly be marked as KFAILs. Based on Pedro Alves's suggestion I've
added some more of the detail that I mentioned in my first email, to
the commit message (in the attached updated patch).

The GCC bug is exposed in the suite as UNSUPPORTED - since GCC doesn't
use the typedef in the inheritance, GCC doesn't actually exercise this
part of the compiler. The non-typedef'd base tests can be exercised
with either Clang or GCC's output, but since GCC doesn't use the
typedef in the inheritance, testing that in GDB won't actually test
anything other than redundantly test the non-typedef path again.

> Ok with those changes.
> [Though I can well imagine I'm missing something.
> This part of the testsuite and c++ is a bit beyond me.]

Let me know if there's some more information you'd like/I can provide.
Happy to try to explain in more detail.

Updated patch attached with
* more detailed commit message
* kfail with GDB bug number (GDB 16841) instead of placeholders

Attachment: typedef_virtual_inheritance.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]