This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite/cp] derivation.exp: cosmetic bug in protected inheritance
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: carlton at kealia dot com, gdb-patches at sources dot redhat dot com
- Date: Tue, 13 Jan 2004 22:55:38 -0500 (EST)
- Subject: [patch/testsuite/cp] derivation.exp: cosmetic bug in protected inheritance
This patch detects a cosmetic bug with protected inheritance.
The bug is:
class B { ... };
class D : protected B { ... };
(gdb) ptype D
type = class D: private B { ... };
This was a simple bug in gcc; it just didn't test for "protected"
in dbxout.c. Andrew Pinskia has fixed the bug in gcc HEAD.
So, this patch improves derivation.exp to give a result of XFAIL
rather than PASS on this output.
Tested on:
native i686-pc-linux-gnu, gcc 2.95.3 3.3.2 HEAD, dwarf-2 stabs+
IACTN,
Michael C
2004-01-13 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/derivation.exp: Add XFAIL for bug with protected
inheritance. PR gdb/1498, PR gcc/13539.
Index: gdb.cp/derivation.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/derivation.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 derivation.exp
*** gdb.cp/derivation.exp 9 Jan 2004 04:57:09 -0000 1.5
--- gdb.cp/derivation.exp 14 Jan 2004 03:46:56 -0000
*************** gdb_test_multiple "ptype d_instance" "pt
*** 111,124 ****
pass "ptype d_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
! # TODO: this is a gcc bug
! # kfail "gdb/1498" "ptype d_instance"
! pass "ptype d_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
! # TODO: this is a gcc bug.
! # kfail "gdb/1498" "ptype d_instance"
! pass "ptype d_instance"
}
}
--- 111,126 ----
pass "ptype d_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
! # This is a gcc bug, gcc/13539, gdb/1498.
! # Fixed in gcc HEAD 2004-01-13
! setup_xfail "*-*-*" "gcc/13539"
! fail "ptype d_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
! # This is a gcc bug, gcc/13539, gdb/1498.
! # Fixed in gcc HEAD 2004-01-13
! setup_xfail "*-*-*" "gcc/13539"
! fail "ptype d_instance"
}
}
*************** gdb_test_multiple "ptype e_instance" "pt
*** 145,158 ****
pass "ptype e_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
! # TODO: this is a gcc bug.
! # kfail "gdb/1498" "ptype e_instance"
! pass "ptype e_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
! # TODO: this is a gcc bug.
! # kfail "gdb/1498" "ptype e_instance"
! pass "ptype e_instance"
}
}
--- 147,162 ----
pass "ptype e_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_methods${ws}$re_synth_gcc_23$nl\}$nl$gdb_prompt $" {
! # This is a gcc bug, gcc/13539, gdb/1498.
! # Fixed in gcc HEAD 2004-01-13
! setup_xfail "*-*-*" "gcc/13539"
! fail "ptype e_instance"
}
-re "type = $XX_class${ws}$re_fields${ws}$re_all_methods$nl\}$nl$gdb_prompt $" {
! # This is a gcc bug, gcc/13539, gdb/1498.
! # Fixed in gcc HEAD 2004-01-13
! setup_xfail "*-*-*" "gcc/13539"
! fail "ptype e_instance"
}
}