]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 May 2015 20:42:20 +0000 (20:42 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 May 2015 20:42:20 +0000 (20:42 +0000)
bother about NaN's if Machine_Overflows is true.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223717 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index dcb4620d292f0c0f21f29c7d78421943020f91fd..b6e11e1cbbcc07c4883d0c6f0d9ecc0e80e8cc79 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Min/Attr_Max>: Do not
+       bother about NaN's if Machine_Overflows is true.
+
 2015-05-26  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (gnat_to_gnu) <N_Object_Declaration>: Really
index 8efa59dc86e6cdecf8cd43cd8c5faddd0d206431..7fc8a5c7d8f360e943d48f36f5ea68814f26394c 100644 (file)
@@ -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);