From: Eric Botcazou Date: Sat, 19 Dec 2020 10:46:06 +0000 (+0100) Subject: [Ada] Change rounding mode of 'Machine for static floating point X-Git-Tag: basepoints/gcc-13~8038 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42add8097cba0fa15bb3ee78f322f9f5b114280a;p=thirdparty%2Fgcc.git [Ada] Change rounding mode of 'Machine for static floating point gcc/ada/ * sem_attr.adb (Eval_Attribute) : Use Round_Even instead of Round in the call to the Machine routine. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 2226eced4421..9d96ee16c5b0 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -9107,11 +9107,13 @@ package body Sem_Attr is -- Machine -- ------------- + -- We use the same rounding mode as the one used for RM 4.9(38) + when Attribute_Machine => Fold_Ureal (N, Eval_Fat.Machine - (P_Base_Type, Expr_Value_R (E1), Eval_Fat.Round, N), + (P_Base_Type, Expr_Value_R (E1), Eval_Fat.Round_Even, N), Static); ------------------