aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2004-05-02 13:41:20 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2004-05-02 13:41:20 +0000
commitfc627530050e2fa95aa19ae67fa6e0fbad552696 (patch)
tree57921ff518a12bb0642a0adb6aeb58319331340b /gcc
parenteb4c9b54b4a59525e6e9cc60b3387440d14f60b9 (diff)
downloadgcc-fc627530050e2fa95aa19ae67fa6e0fbad552696.zip
gcc-fc627530050e2fa95aa19ae67fa6e0fbad552696.tar.gz
gcc-fc627530050e2fa95aa19ae67fa6e0fbad552696.tar.bz2
fold-const.c (fold_convert_const, fold): Add missing FIX_ROUND_EXPR case.
* fold-const.c (fold_convert_const, fold): Add missing FIX_ROUND_EXPR case. From-SVN: r81410
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 81302ea..c152f19 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * fold-const.c (fold_convert_const, fold): Add missing
+ FIX_ROUND_EXPR case.
+
2004-05-02 Alexandre Oliva <aoliva@redhat.com>
* configure.ac (FLEX, BISON): Only use tools from the build tree
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 1aed785..1c2bdf4 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1788,6 +1788,10 @@ fold_convert_const (enum tree_code code, tree type, tree arg1)
real_floor (&r, VOIDmode, &x);
break;
+ case FIX_ROUND_EXPR:
+ real_round (&r, VOIDmode, &x);
+ break;
+
default:
abort ();
}
@@ -5630,6 +5634,7 @@ fold (tree expr)
case FIX_TRUNC_EXPR:
case FIX_CEIL_EXPR:
case FIX_FLOOR_EXPR:
+ case FIX_ROUND_EXPR:
if (TREE_TYPE (TREE_OPERAND (t, 0)) == type)
return TREE_OPERAND (t, 0);