[gdb/testsuite] Improve xfail in gdb.cp/nsusing.exp
In test-case gdb.cp/nsusing.exp I came across these xfails without PRMS mentioned: ... XFAIL: gdb.cp/nsusing.exp: print x, before using statement XFAIL: gdb.cp/nsusing.exp: print x, only using M ... Add the missing PRMS, such that we have: ... XFAIL: gdb.cp/nsusing.exp: print x, before using statement (PRMS gcc/108716) XFAIL: gdb.cp/nsusing.exp: print x, only using M (PRMS gcc/108716) ... and limit the xfail to unfixed versions. The PR is fixed starting gcc 13, but it has been backported to release branches stretching back to gcc 10. For simplicity we just stick to testing for the major version and ignore the backported fixes. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
b3e174482f
commit
0789a13f8a
@ -122,14 +122,23 @@ if { [test_compiler_info {gcc-[0-3]-*}] ||
|
||||
return
|
||||
}
|
||||
|
||||
# Xfail for incorrect decl_line on DW_TAG_imported_module,
|
||||
# gcc PR debug/108716.
|
||||
set have_gcc108716_xfail \
|
||||
[expr [test_compiler_info gcc-*] && [gcc_major_version] < 13]
|
||||
|
||||
gdb_test_multiple "print x" "print x, before using statement" {
|
||||
-re -wrap "No symbol .x. in current context.*" {
|
||||
pass $gdb_test_name
|
||||
}
|
||||
-re -wrap "Reference to .x. is ambiguous.*" {
|
||||
# GCC doesn't properly set the decl_line for namespaces, so GDB believes
|
||||
# that the "using namespace M" line has already passed at this point.
|
||||
xfail $gdb_test_name
|
||||
if { $have_gcc108716_xfail } {
|
||||
# GCC doesn't properly set the decl_line for namespaces, so GDB
|
||||
# believes that the "using namespace M" line has already passed at
|
||||
# this point.
|
||||
setup_xfail *-*-* gcc/108716
|
||||
}
|
||||
fail $gdb_test_name
|
||||
}
|
||||
}
|
||||
gdb_test "next" ".*" "using namespace M"
|
||||
@ -138,7 +147,10 @@ gdb_test_multiple "print x" "print x, only using M" {
|
||||
pass $gdb_test_name
|
||||
}
|
||||
-re -wrap "Reference to .x. is ambiguous.*" {
|
||||
xfail $gdb_test_name
|
||||
if { $have_gcc108716_xfail } {
|
||||
setup_xfail *-*-* gcc/108716
|
||||
}
|
||||
fail $gdb_test_name
|
||||
}
|
||||
}
|
||||
gdb_test "next" ".*" "using namespace N"
|
||||
|
Loading…
x
Reference in New Issue
Block a user