From 371e764dd93060374ed064413cd5c99a194c0e5e Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Tue, 5 Aug 2014 09:52:21 +0000 Subject: [convert.c] PR 61876: Guard transformation to lrint by -fno-math-errno. * convert.c (convert_to_integer): Guard transformation to lrint by -fno-math-errno. From-SVN: r213628 --- gcc/ChangeLog | 5 +++++ gcc/convert.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9dc7fd..cec3fc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-08-05 Kyrylo Tkachov + + * convert.c (convert_to_integer): Guard transformation to lrint by + -fno-math-errno. + 2014-08-05 James Greenhalgh * config/aarch64/aarch64-builtins.c diff --git a/gcc/convert.c b/gcc/convert.c index 8dbf3cb..3834351 100644 --- a/gcc/convert.c +++ b/gcc/convert.c @@ -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) -- cgit v1.1