summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2011-08-26 18:10:45 +0200
committerUros Bizjak <uros@gcc.gnu.org>2011-08-26 18:10:45 +0200
commit44782c0cba5373316f040b9c9074ded0c3e889f2 (patch)
treecab31e84d31bebf31ed45cd98b19f782affd5937 /gcc/convert.c
parent0b11d702dbe669203a2f36430892905c526e03ab (diff)
downloadgcc-44782c0cba5373316f040b9c9074ded0c3e889f2.tar.gz
re PR middle-end/50083 (All 32-bit fortran tests fail on 32-bit Solaris)
PR middle-end/50083 * convert.c (convert_to_integer) <BUIT_IN_ROUND{,F,L}>: Convert only when TARGET_C99_FUNCTIONS. <BUILT_IN_NEARBYINT{,F,L}>: Ditto. <BUILT_IN_RINT{,F,L}>: Ditto. From-SVN: r178119
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index d72dda8fd82..a647193ca94 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -469,6 +469,9 @@ convert_to_integer (tree type, tree expr)
break;
CASE_FLT_FN (BUILT_IN_ROUND):
+ /* Only convert in ISO C99 mode. */
+ if (!TARGET_C99_FUNCTIONS)
+ break;
if (outprec < TYPE_PRECISION (integer_type_node)
|| (outprec == TYPE_PRECISION (integer_type_node)
&& !TYPE_UNSIGNED (type)))
@@ -487,11 +490,14 @@ convert_to_integer (tree type, tree expr)
break;
/* ... Fall through ... */
CASE_FLT_FN (BUILT_IN_RINT):
+ /* Only convert in ISO C99 mode. */
+ if (!TARGET_C99_FUNCTIONS)
+ break;
if (outprec < TYPE_PRECISION (integer_type_node)
|| (outprec == TYPE_PRECISION (integer_type_node)
&& !TYPE_UNSIGNED (type)))
fn = mathfn_built_in (s_intype, BUILT_IN_IRINT);
- else if (outprec < TYPE_PRECISION (long_integer_type_node)
+ else if (outprec == TYPE_PRECISION (long_integer_type_node)
&& !TYPE_UNSIGNED (type))
fn = mathfn_built_in (s_intype, BUILT_IN_LRINT);
else if (outprec == TYPE_PRECISION (long_long_integer_type_node)