]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[convert.c] PR 61876: Guard transformation to lrint by -fno-math-errno.
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 5 Aug 2014 09:52:21 +0000 (09:52 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 5 Aug 2014 09:52:21 +0000 (09:52 +0000)
* convert.c (convert_to_integer): Guard transformation to lrint by
-fno-math-errno.

From-SVN: r213628

gcc/ChangeLog
gcc/convert.c

index d9dc7fdaf2b8f7fac3c4b57c2a4a091a1cf1496d..cec3fc6460cda4596ea9ac457a06d2ececdbe68e 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       * convert.c (convert_to_integer): Guard transformation to lrint by
+       -fno-math-errno.
+
 2014-08-05  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * config/aarch64/aarch64-builtins.c
index 8dbf3cb07975981972ceb471e4ac02c74a26c6f7..3834351aad52811f5c63ae1dd074e2c12de2f1a9 100644 (file)
@@ -477,8 +477,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)