Mark some tests as XFAIL/UNSUPPORTED hidden due to GCC's omission of typedefs in inheritance.
Commit Message
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
Comments
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.
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)
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.]
Hi David,
No comments on the patch itself, just a nit.
On 04/13/2014 07:27 PM, David Blaikie wrote:
> 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.
>
>
> typedef_virtual_inheritance.diff
>
>
> 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.
I notice that the commit log doesn't have all the detail that your intro
above has. Ideally the commit log would be complete as well.
I suggest not treating those as separate info at all, thus putting
all info in the commit log. Then you can just use "git send-email"
to send the patches, even.
> gdb/testsuite/
> * gdb.cp/impl-this.exp: Mark several tests XFAIL/UNSUPPORTED due to
> PR16841 and GCC PR60833
> - gdb_test "print B<int>::A<int>::i" "Cannot reference non-static field \"i\""
> + if {[test_compiler_info {gcc-*-*}]} {
> + unsupported "gdb/16841"
> + } else {
> + setup_kfail gdb/x *-*-*
Thanks,
@@ -1,3 +1,8 @@
+2014-04-12 David Blaikie <dblaikie@gmail.com>
+
+ * gdb.cp/impl-this.exp: Mark several tests XFAIL/UNSUPPORTED due to
+ PR16841 and GCC PR60833
+
2014-04-12 Siva Chandra Reddy <sivachandra@google.com>
Doug Evans <xdje42@gmail.com>
@@ -30,13 +30,22 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
with_test_prefix "before run" {
gdb_test "print i" "No symbol \"i\" in current context."
gdb_test "print D::i" "Cannot reference non-static field \"i\""
- gdb_test "print D::B<int>::i" "Cannot reference non-static field \"i\""
- gdb_test "print B<int>::i" "Cannot reference non-static field \"i\""
gdb_test "print D::C::i" "Cannot reference non-static field \"i\""
gdb_test "print C::i" "Cannot reference non-static field \"i\""
- gdb_test "print D::B<int>::A<int>::i" \
- "Cannot reference non-static field \"i\""
- gdb_test "print B<int>::A<int>::i" "Cannot reference non-static field \"i\""
+ if {[test_compiler_info {gcc-*-*}]} {
+ unsupported "gdb/16841"
+ } else {
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::i" "Cannot reference non-static field \"i\""
+ gdb_test "print D::Bint::i" "Cannot reference non-static field \"i\""
+ gdb_test "print B<int>::i" "Cannot reference non-static field \"i\""
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::A<int>::i" \
+ "Cannot reference non-static field \"i\""
+ gdb_test "print D::Bint::A<int>::i" \
+ "Cannot reference non-static field \"i\""
+ gdb_test "print B<int>::A<int>::i" "Cannot reference non-static field \"i\""
+ }
gdb_test "print A<int>::i" "Cannot reference non-static field \"i\""
gdb_test "print D::C::A<int>::i" "Cannot reference non-static field \"i\""
gdb_test "print C::A<int>::i" "Cannot reference non-static field \"i\""
@@ -61,18 +70,27 @@ gdb_continue_to_breakpoint "continue to D::f"
with_test_prefix "at D::f (valid expressions)" {
gdb_test "print i" "= 4"
gdb_test "print D::i" "= 4"
- gdb_test "print D::B<int>::i" "= 2"
- gdb_test "print B<int>::i" "= 2"
- gdb_test "print D::Bint::i" \
- "No type \"Bint\" within class or namespace \"D\"."
- gdb_test "print Bint::i" "= 2"
+ if {[test_compiler_info {gcc-*-*}]} {
+ unsupported "gdb/16841"
+ } else {
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::i" "= 2"
+ setup_kfail gdb/y *-*-*
+ gdb_test "print B<int>::i" "= 2"
+ setup_kfail gdb/y *-*-*
+ gdb_test "print Bint::i" "= 2"
+ setup_kfail gdb/y *-*-*
+ gdb_test "print D::Bint::i" "= 2"
+ setup_kfail gdb/y *-*-*
+ gdb_test "print Bint::i" "= 2"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::A<int>::i" "= 1"
+ gdb_test "print B<int>::A<int>::i" "= 1"
+ gdb_test "print D::Bint::A<int>::i" "= 1"
+ gdb_test "print Bint::A<int>::i" "= 1"
+ }
gdb_test "print D::C::i" "= 3"
gdb_test "print C::i" "= 3"
- gdb_test "print D::B<int>::A<int>::i" "= 1"
- gdb_test "print B<int>::A<int>::i" "= 1"
- gdb_test "print D::Bint::A<int>::i" \
- "No type \"Bint\" within class or namespace \"D\"."
- gdb_test "print Bint::A<int>::i" "= 1"
gdb_test "print A<int>::i" "= 1"
gdb_test "print D::C::A<int>::i" "= 1"
gdb_test "print C::A<int>::i" "= 1"
@@ -86,29 +104,40 @@ with_test_prefix "at D::f (valid expressions)" {
# Test some invalid expressions
with_test_prefix "at D::f (invalid expressions)" {
- gdb_test "print D::B<int>::c" "There is no field named c"
- gdb_test "print D::B<int>::A<int>::c" "There is no field named c"
- gdb_test "print D::Bint::c" \
- "No type \"Bint\" within class or namespace \"D\"."
-
- gdb_test "print D::Bint::A<int>::c" \
- "No type \"Bint\" within class or namespace \"D\"."
- gdb_test "print D::C::A<int>::c" "There is no field named c"
- gdb_test "print B<int>::c" "There is no field named c"
- gdb_test "print B<int>::A<int>::c" "There is no field named c"
- gdb_test "print Bint::c" "There is no field named c"
- gdb_test "print Bint::A<int>::c" "There is no field named c"
+ if {[test_compiler_info {gcc-*-*}]} {
+ unsupported "gdb/16841"
+ } else {
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::c" "There is no field named c"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::A<int>::c" "There is no field named c"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::Bint::c" \
+ "No type \"Bint\" within class or namespace \"D\"."
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::Bint::A<int>::c" \
+ "No type \"Bint\" within class or namespace \"D\"."
+ gdb_test "print B<int>::c" "There is no field named c"
+ gdb_test "print B<int>::A<int>::c" "There is no field named c"
+ gdb_test "print Bint::c" "There is no field named c"
+ gdb_test "print Bint::A<int>::c" "There is no field named c"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::x" "There is no field named x"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::B<int>::A<int>::x" "There is no field named x"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::Bint::x" \
+ "No type \"Bint\" within class or namespace \"D\"."
+ setup_kfail gdb/x *-*-*
+ gdb_test "print D::Bint::A<int>::x" \
+ "No type \"Bint\" within class or namespace \"D\"."
+ gdb_test "print B<int>::x" "There is no field named x"
+ gdb_test "print B<int>::A<int>::x" "There is no field named x"
+ gdb_test "print Bint::x" "There is no field named x"
+ gdb_test "print Bint::A<int>::x" "There is no field named x"
+ }
gdb_test "print C::A<int>::c" "There is no field named c"
- gdb_test "print D::B<int>::x" "There is no field named x"
- gdb_test "print D::B<int>::A<int>::x" "There is no field named x"
- gdb_test "print D::Bint::x" \
- "No type \"Bint\" within class or namespace \"D\"."
- gdb_test "print D::Bint::A<int>::x" \
- "No type \"Bint\" within class or namespace \"D\"."
- gdb_test "print B<int>::x" "There is no field named x"
- gdb_test "print B<int>::A<int>::x" "There is no field named x"
- gdb_test "print Bint::x" "There is no field named x"
- gdb_test "print Bint::A<int>::x" "There is no field named x"
+ gdb_test "print D::C::A<int>::c" "There is no field named c"
gdb_test "print D::C::x" "There is no field named x"
gdb_test "print C::x" "There is no field named x"
gdb_test "print D::C::A<int>::x" "There is no field named x"
@@ -117,8 +146,14 @@ with_test_prefix "at D::f (invalid expressions)" {
# Test some ambiguous names
with_test_prefix "at D::f (ambiguous names)" {
- gdb_test "print B<int>::common" " = 200"
- gdb_test "print Bint::common" " = 200"
+ if {[test_compiler_info {gcc-*-*}]} {
+ unsupported "gdb/16841"
+ } else {
+ setup_kfail gdb/x *-*-*
+ gdb_test "print B<int>::common" " = 200"
+ setup_kfail gdb/x *-*-*
+ gdb_test "print Bint::common" " = 200"
+ }
gdb_test "print C::common" " = 300"
gdb_test "print am.i" " = 1000"
gdb_test "print am.A<int>::i" \