diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-12-19 11:46:06 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-04-29 04:00:49 -0400 |
commit | 42add8097cba0fa15bb3ee78f322f9f5b114280a (patch) | |
tree | 76798fe4aa55d7c1d8512aff3830eb6ab2a94fa3 /gcc | |
parent | c1efbbba84d4d2f266d2591af747e7f64c2f473a (diff) | |
download | gcc-42add8097cba0fa15bb3ee78f322f9f5b114280a.zip gcc-42add8097cba0fa15bb3ee78f322f9f5b114280a.tar.gz gcc-42add8097cba0fa15bb3ee78f322f9f5b114280a.tar.bz2 |
[Ada] Change rounding mode of 'Machine for static floating point
gcc/ada/
* sem_attr.adb (Eval_Attribute) <Attribute_Machine>: Use
Round_Even instead of Round in the call to the Machine routine.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_attr.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 2226ece..9d96ee1 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); ------------------ |