aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-26 20:42:20 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-05-26 20:42:20 +0000
commit89d5c50bd125f14c416700f19a4cc963599e9428 (patch)
treed94333e02a27842df2cfb2ef090a3928edc46d61 /gcc/ada/gcc-interface
parent545b492365b7ce6270d739c3ad88b05c51d4aeab (diff)
downloadgcc-89d5c50bd125f14c416700f19a4cc963599e9428.zip
gcc-89d5c50bd125f14c416700f19a4cc963599e9428.tar.gz
gcc-89d5c50bd125f14c416700f19a4cc963599e9428.tar.bz2
trans.c (Attribute_to_gnu): Do not bother about NaN's if Machine_Overflows is true.
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not bother about NaN's if Machine_Overflows is true. From-SVN: r223717
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 8efa59d..7fc8a5c 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -2283,7 +2283,8 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
a NaN so we implement the semantics of C99 f{min,max} to make it
predictable in this case: if either operand is a NaN, the other
is returned; if both operands are NaN's, a NaN is returned. */
- if (SCALAR_FLOAT_TYPE_P (gnu_result_type))
+ if (SCALAR_FLOAT_TYPE_P (gnu_result_type)
+ && !Machine_Overflows_On_Target)
{
const bool lhs_side_effects_p = TREE_SIDE_EFFECTS (gnu_lhs);
const bool rhs_side_effects_p = TREE_SIDE_EFFECTS (gnu_rhs);