]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR 61876: Do not convert cast + __builtin_round into __builtin_lround unless -fno...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 24 Jul 2014 13:23:05 +0000 (13:23 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 24 Jul 2014 13:23:05 +0000 (13:23 +0000)
PR middle-end/61876
* convert.c (convert_to_integer): Do not convert BUILT_IN_ROUND and cast
when flag_errno_math is on.

From-SVN: r212989

gcc/ChangeLog
gcc/convert.c

index 04c51e40e84caf95197ff2aef5c0eb9c82a4cefc..96a8161787ddec3a2b0b863b580087a62c4f2ef2 100644 (file)
@@ -1,3 +1,9 @@
+2014-07-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR middle-end/61876
+       * convert.c (convert_to_integer): Do not convert BUILT_IN_ROUND and cast
+       when flag_errno_math is on.
+
 2014-07-24  Martin Liska  <mliska@suse.cz>
 
        * cgraph.h (varpool_node):
index 09bc555ee0ee88ddb3a05f647e7ea13476889de7..8dbf3cb07975981972ceb471e4ac02c74a26c6f7 100644 (file)
@@ -456,8 +456,8 @@ convert_to_integer (tree type, tree expr)
          break;
 
        CASE_FLT_FN (BUILT_IN_ROUND):
-         /* Only convert in ISO C99 mode.  */
-         if (!targetm.libc_has_function (function_c99_misc))
+         /* Only convert in ISO C99 mode and with -fno-math-errno.  */
+         if (!targetm.libc_has_function (function_c99_misc) || flag_errno_math)
            break;
          if (outprec < TYPE_PRECISION (integer_type_node)
              || (outprec == TYPE_PRECISION (integer_type_node)