aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/impl-this.exp45
1 files changed, 33 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.cp/impl-this.exp b/gdb/testsuite/gdb.cp/impl-this.exp
index 2910bf7..4a11fb2 100644
--- a/gdb/testsuite/gdb.cp/impl-this.exp
+++ b/gdb/testsuite/gdb.cp/impl-this.exp
@@ -26,6 +26,8 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
+set gcc_used [test_compiler_info gcc-*-*]
+
# First test expressions when there is no context.
with_test_prefix "before run" {
gdb_test "print i" "No symbol \"i\" in current context."
@@ -63,15 +65,23 @@ with_test_prefix "at D::f (valid expressions)" {
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\"."
+
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::i" "= 2"
+
gdb_test "print Bint::i" "= 2"
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\"."
+
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::A<int>::i" "= 1"
+
gdb_test "print Bint::A<int>::i" "= 1"
gdb_test "print A<int>::i" "= 1"
gdb_test "print D::C::A<int>::i" "= 1"
@@ -88,11 +98,16 @@ with_test_prefix "at D::f (valid 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\"."
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::c" "There is no field named c"
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::A<int>::c" "There is no field named c"
+
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"
@@ -101,10 +116,16 @@ with_test_prefix "at D::f (invalid expressions)" {
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\"."
+
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::x" "There is no field named x"
+ if {$gcc_used} {
+ setup_xfail *-*-* gcc/60833
+ }
+ gdb_test "print D::Bint::A<int>::x" "There is no field named x"
+
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"