# print.
gdb_test_no_output {maint expand-symtabs "\(pck\|foo\)\.adb"}
+set gcc_major_version [gcc_major_version]
+set have_xfail [expr $gcc_major_version >= 8 && $gcc_major_version <= 9]
+
# The xfail is for PR gcc/94469, which occurs with target board
# unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects and gcc-8 and later.
# Note: We don't check for the filename in xfail_re because it might be
# Make sure that last_node_id is set to zero...
gdb_test_multiple "print last_node_id" "print last_node_id before calling pn" {
-re $xfail_re {
- xfail $gdb_test_name
+ if { $have_xfail } {
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
# One of the choices will print the correct value, the other one
# <optimized out>. Since we don't known which one to choose to get
# the correct value, cancel.
# Make sure that last_node_id now has the correct value...
gdb_test_multiple "print last_node_id" "print last_node_id after calling pn" {
-re $xfail_re {
- xfail $gdb_test_name
+ if { $have_xfail } {
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
# Cancel
gdb_test_multiple "0" "cancel after xfail 2" {
-re -wrap "cancelled" {