* fold-const.c (fold_convert_const, fold): Add missing
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 2 May 2004 13:41:20 +0000 (13:41 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 2 May 2004 13:41:20 +0000 (13:41 +0000)
FIX_ROUND_EXPR case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81410 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index 81302ea..c152f19 100644 (file)
@@ -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
index 1aed785..1c2bdf4 100644 (file)
@@ -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);