OSDN Git Service

(build_binary_op): For *_DIV_EXPR, set shorten based on orig_op0.
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 1993 00:48:54 +0000 (00:48 +0000)
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Oct 1993 00:48:54 +0000 (00:48 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5669 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-typeck.c

index 05a4e02..096c132 100644 (file)
@@ -1943,7 +1943,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
          else
            /* When dividing two signed integers, you have to promote to int.
               E.g. (short) -32868 / (short) -1 doesn't fit in a short.  */
-           shorten = TREE_UNSIGNED (op0);
+           shorten = TREE_UNSIGNED (orig_op0);
          common = 1;
        }
       break;