Avoid failures in fixed_points.exp with older GCC
authorTom Tromey <tromey@adacore.com>
Tue, 1 Aug 2023 14:33:42 +0000 (08:33 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 2 Aug 2023 16:13:02 +0000 (10:13 -0600)
Tom de Vries pointed out that my recent change to fixed_points.exp
failed with older versions of GCC.  This patch fixes the problem by
skipping the new test in this situation.

gdb/testsuite/gdb.ada/fixed_points.exp

index 2edc63f..1c5719a 100644 (file)
@@ -92,6 +92,9 @@ foreach_with_prefix scenario {all minimal} {
        gdb_test "print fp5_var" " = 3e-19"
     }
 
-    gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \
-       "value of another_fixed"
+    # This failed before GCC 10.
+    if {$scenario == "all" && [test_compiler_info {gcc-10-*}]} {
+       gdb_test "p Float(Another_Fixed) = Float(Another_Delta * 5)" "true" \
+           "value of another_fixed"
+    }
 }