diff options
author | Tom de Vries <tdevries@suse.de> | 2024-10-17 15:54:08 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-10-17 15:54:08 +0200 |
commit | 34f93a568c4a3b264025e36f099bc29e94929e2a (patch) | |
tree | 1b6287bb58417169a04647d91e27fe647d87b485 | |
parent | 4cb77761d68791aa3fd9e7c0ec37fce86a4661f3 (diff) | |
download | binutils-34f93a568c4a3b264025e36f099bc29e94929e2a.zip binutils-34f93a568c4a3b264025e36f099bc29e94929e2a.tar.gz binutils-34f93a568c4a3b264025e36f099bc29e94929e2a.tar.bz2 |
[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 1411185a57e ("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.
-rw-r--r-- | gdb/testsuite/gdb.ada/fixed_points.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp index b2b3df4..19ec1f8 100644 --- a/gdb/testsuite/gdb.ada/fixed_points.exp +++ b/gdb/testsuite/gdb.ada/fixed_points.exp @@ -93,7 +93,7 @@ foreach_gnat_encoding scenario flags {all minimal} { } # This failed before GCC 10. - if {$scenario == "all" && [gnat_version_compare < 10]} { + if {$scenario == "all" && [gnat_version_compare >= 10]} { gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \ "value of another_fixed" } |