Skip to content

Commit 34f93a5

Browse files
committed
[gdb/testsuite] Fix gdb.ada/fixed_points.exp for gcc < 10
When running test-case gdb.ada/fixed_points.exp with system gcc 7, I run into: ... (gdb) PASS: gdb.ada/fixed_points.exp: scenario=all: print fp4_var / 1 get_compiler_info: gcc-7-5-0 p Float(Another_Fixed) = Float(Another_Delta * 5)^M No definition of "another_delta" in current context.^M (gdb) FAIL: gdb.ada/fixed_points.exp: scenario=all: value of another_fixed ... This is a regression since commit 1411185 ("Introduce and use gnat_version_compare"), which did: ... # This failed before GCC 10. - if {$scenario == "all" && [test_compiler_info {gcc-10-*}]} { + if {$scenario == "all" && [gnat_version_compare < 10]} { gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \ "value of another_fixed" } ... Fix this by using gnat_version_compare >= 10 instead. Tested on x86_64-linux, with gcc 7 - 13.
1 parent 4cb7776 commit 34f93a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gdb/testsuite/gdb.ada/fixed_points.exp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
9393
}
9494

9595
# This failed before GCC 10.
96-
if {$scenario == "all" && [gnat_version_compare < 10]} {
96+
if {$scenario == "all" && [gnat_version_compare >= 10]} {
9797
gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \
9898
"value of another_fixed"
9999
}

0 commit comments

Comments
 (0)