[PATCH] Fix bug in fixed-point handling

Tom de Vries tdevries@suse.de
Wed Aug 2 15:25:45 GMT 2023


On 8/2/23 17:10, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> Yes, the test-cases passes for gcc 10, 11 and 12, and fails for gcc 7,
> Tom> 8 and 9.
> 
>>> I'm wondering if the appended is enough or if it should be conditional
>>> on gcc 10 specifically.
>>>
> 
> Tom> With the patch applied, it passes for all the above.
> 
> Would you mind trying the appended?  It tightens the test to make it
> specific to the "all" scenario and to be skipped only for GCC < 10.
> 

Tested with gcc 7 - 12, only expected passes.

Thanks,
- Tom

> thanks,
> Tom
> 
> diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
> index 2edc63f4071..05e86b9d0ed 100644
> --- a/gdb/testsuite/gdb.ada/fixed_points.exp
> +++ b/gdb/testsuite/gdb.ada/fixed_points.exp
> @@ -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"
> +    }
>   }



More information about the Gdb-patches mailing list