[PATCH] Fix bug in fixed-point handling
Tom Tromey
tromey@adacore.com
Tue Aug 1 14:35:39 GMT 2023
Tom> Test-case fails with gcc-9 and earlier:
Tom> ...
Tom> (gdb) PASS: gdb.ada/fixed_points.exp: scenario=all: print fp4_var / 1
Tom> p Float(Another_Fixed) = Float(Another_Delta * 5)^M
Tom> No definition of "another_delta" in current context.^M
Tom> (gdb) FAIL: gdb.ada/fixed_points.exp: scenario=all: value of another_fixed
Tom> ...
Did you happen to try with GCC 10?
I'm wondering if the appended is enough or if it should be conditional
on gcc 10 specifically.
Tom
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
index 2edc63f4071..12f1adfc249 100644
--- a/gdb/testsuite/gdb.ada/fixed_points.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points.exp
@@ -90,8 +90,8 @@ foreach_with_prefix scenario {all minimal} {
# This only started working in GCC 11.
if {$scenario == "minimal" && [test_compiler_info {gcc-11-*}]} {
gdb_test "print fp5_var" " = 3e-19"
- }
- gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \
- "value of another_fixed"
+ gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \
+ "value of another_fixed"
+ }
}
More information about the Gdb-patches
mailing list