2014-08-22 Yvan Roux <yvan.roux@linaro.org>
authoryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2014 10:48:22 +0000 (10:48 +0000)
committeryroux <yroux@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2014 10:48:22 +0000 (10:48 +0000)
Backport from trunk r212989, r213628.
2014-08-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* convert.c (convert_to_integer): Guard transformation to lrint by
-fno-math-errno.

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.

git-svn-id: svn://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@214312 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/convert.c

index c16ddf6..7b2d66e 100644 (file)
@@ -1,3 +1,17 @@
+2014-08-22 Yvan Roux  <yvan.roux@linaro.org>
+
+       Backport from trunk r212989, r213628.
+       2014-08-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * convert.c (convert_to_integer): Guard transformation to lrint by
+       -fno-math-errno.
+
+       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-08-15  Yvan Roux  <yvan.roux@linaro.org>
 
        * LINARO-VERSION: Bump version.
index 91c1da2..304958e 100644 (file)
@@ -453,8 +453,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)
@@ -474,8 +474,8 @@ convert_to_integer (tree type, tree expr)
            break;
          /* ... Fall through ...  */
        CASE_FLT_FN (BUILT_IN_RINT):
-         /* 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)