OSDN Git Service

(const_binop): When evaluating a shift, ignore
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Mar 1993 08:18:16 +0000 (08:18 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Mar 1993 08:18:16 +0000 (08:18 +0000)
overflows generated by force_fit_type.

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

gcc/fold-const.c

index fe9b72d..ec04f44 100644 (file)
@@ -1095,7 +1095,12 @@ const_binop (code, arg1, arg2, notrunc)
                         &low, &hi,
                         !uns);
          t = build_int_2 (low, hi);
-         break;
+         TREE_TYPE (t) = TREE_TYPE (arg1);
+         if (!notrunc)
+           force_fit_type (t, 0);
+         TREE_CONSTANT_OVERFLOW (t)
+           = TREE_CONSTANT_OVERFLOW (arg1) | TREE_CONSTANT_OVERFLOW (arg2);
+         return t;
 
        case RROTATE_EXPR:
          int2l = - int2l;