# right times.
# X is derived from A1 and A2; both A1 and A2 have a member 'x'
+setup_kfail gdb/26602 *-*-*
send_gdb "print x.x\n"
gdb_expect {
-re "warning: x ambiguous; using X::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
# N is derived from A1 and A2, but not immediately -- two steps
# up in the hierarchy. Both A1 and A2 have a member 'x'.
+setup_kfail gdb/26602 *-*-*
send_gdb "print n.x\n"
gdb_expect {
-re "warning: x ambiguous; using N::M::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
}
# J is derived from A1 twice. A1 has a member x.
+setup_kfail gdb/26602 *-*-*
send_gdb "print j.x\n"
gdb_expect {
-re "warning: x ambiguous; using J::L::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
# JVA1 is derived from A1; A1 occurs as a virtual base in two
# ancestors, and as a non-virtual immediate base. Ambiguity must
# be reported.
+setup_kfail gdb/26602 *-*-*
send_gdb "print jva1.x\n"
gdb_expect {
-re "warning: x ambiguous; using JVA1::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
# JVA2 is derived from A1 & A2; A1 occurs as a virtual base in two
# ancestors, and A2 is a non-virtual immediate base. Ambiguity must
# be reported as A1 and A2 both have a member 'x'.
+setup_kfail gdb/26602 *-*-*
send_gdb "print jva2.x\n"
gdb_expect {
-re "warning: x ambiguous; using JVA2::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
# J is derived from A1 twice; report ambiguity if a J is
# cast to an A1.
+setup_kfail gdb/26602 *-*-*
send_gdb "print (A1)j\n"
gdb_expect {
-re "warning: A1 ambiguous; using J::L::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
# JVA1 is derived from A1; A1 is a virtual base and also a
# non-virtual base. Must report ambiguity if a JVA1 is cast to an A1.
+setup_kfail gdb/26602 *-*-*
send_gdb "print (A1)jva1\n"
gdb_expect {
-re "warning: A1 ambiguous; using JVA1::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {