https://gcc.gnu.org/g:0ef4195c17fe7b0b755686b13f65b57eff12dfe4
commit r16-1919-g0ef4195c17fe7b0b755686b13f65b57eff12dfe4 Author: Eric Botcazou <ebotca...@adacore.com> Date: Mon May 26 23:56:47 2025 +0200 ada: Use consistent truncation of 'Value for decimal fixed-point types This uses truncation for all bases instead of for base 10 only. gcc/ada/ChangeLog: * libgnat/s-valued.adb (Integer_to_Decimal): Use truncation for the scaled divide operation performed for bases other than 10. Diff: --- gcc/ada/libgnat/s-valued.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/libgnat/s-valued.adb b/gcc/ada/libgnat/s-valued.adb index 4f2e10204668..b7982b6046f7 100644 --- a/gcc/ada/libgnat/s-valued.adb +++ b/gcc/ada/libgnat/s-valued.adb @@ -228,9 +228,9 @@ package body System.Value_D is raise Program_Error; end if; - -- Perform a scaled divide operation with rounding to match 'Image + -- Perform a scaled divide operation with truncation - Scaled_Divide (To_Signed (V), Y, Z, Q, R, Round => True); + Scaled_Divide (To_Signed (V), Y, Z, Q, R, Round => False); return Q; end;