aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2012-03-16 10:14:01 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2012-03-16 10:14:01 +0200
commitc4256b35bfb6a4395951053536300ca1725b0521 (patch)
tree41b18ecfc5a910dc93061ba90a661957c58439a6 /gcc
parentb0743875533107580672c0786b91666c4f0d5108 (diff)
downloadgcc-c4256b35bfb6a4395951053536300ca1725b0521.zip
gcc-c4256b35bfb6a4395951053536300ca1725b0521.tar.gz
gcc-c4256b35bfb6a4395951053536300ca1725b0521.tar.bz2
Don't use BUILT_IN_IROUND for __float128.
2012-03-16 Janne Blomqvist <jb@gcc.gnu.org> * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND for __float128. From-SVN: r185453
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-intrinsic.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index a03df3a..bdc2d84 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-16 Janne Blomqvist <jb@gcc.gnu.org>
+
+ * trans-intrinsic.c (build_round_expr): Don't use BUILT_IN_IROUND
+ for __float128.
+
2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
* f95-lang.c (gfc_init_builtin_functions): Initialize
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 5e54d8e..876eec5 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -383,10 +383,11 @@ build_round_expr (tree arg, tree restype)
resprec = TYPE_PRECISION (restype);
/* Depending on the type of the result, choose the int intrinsic
- (iround, available only as a builtin), long int intrinsic (lround
- family) or long long intrinsic (llround). We might also need to
- convert the result afterwards. */
- if (resprec <= INT_TYPE_SIZE)
+ (iround, available only as a builtin, therefore cannot use it for
+ __float128), long int intrinsic (lround family) or long long
+ intrinsic (llround). We might also need to convert the result
+ afterwards. */
+ if (resprec <= INT_TYPE_SIZE && argprec <= LONG_DOUBLE_TYPE_SIZE)
fn = builtin_decl_for_precision (BUILT_IN_IROUND, argprec);
else if (resprec <= LONG_TYPE_SIZE)
fn = builtin_decl_for_precision (BUILT_IN_LROUND, argprec);