From 89d5c50bd125f14c416700f19a4cc963599e9428 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 26 May 2015 20:42:20 +0000 Subject: [PATCH] trans.c (Attribute_to_gnu): Do not bother about NaN's if Machine_Overflows is true. * gcc-interface/trans.c (Attribute_to_gnu) : Do not bother about NaN's if Machine_Overflows is true. From-SVN: r223717 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/trans.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index dcb4620d292..b6e11e1cbbc 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-05-26 Eric Botcazou + + * gcc-interface/trans.c (Attribute_to_gnu) : Do not + bother about NaN's if Machine_Overflows is true. + 2015-05-26 Eric Botcazou * gcc-interface/trans.c (gnat_to_gnu) : Really diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 8efa59dc86e..7fc8a5c7d8f 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); -- 2.30.2