diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-03-01 16:26:06 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-03-01 16:26:06 -0800 |
commit | 96d8f1d82d37aa4f808a5bf79c33074c0b9929eb (patch) | |
tree | 5ff2a59a2f17879b68cfe99bd91d9900329bb4b0 | |
parent | be1ad04c385fa02ff124ffe38c6b85b7dfbd2c33 (diff) | |
download | gcc-96d8f1d82d37aa4f808a5bf79c33074c0b9929eb.zip gcc-96d8f1d82d37aa4f808a5bf79c33074c0b9929eb.tar.gz gcc-96d8f1d82d37aa4f808a5bf79c33074c0b9929eb.tar.bz2 |
(build_binary_op): Pass TREE_TYPE (orig_op0) not
orig_op0 to TREE_UNSIGNED.
From-SVN: r6684
-rw-r--r-- | gcc/c-typeck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 97fb256..9b56bf9 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1952,7 +1952,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) undefined if the quotient can't be represented in the computation mode. We shorten only if unsigned or if dividing by something we know != -1. */ - shorten = (TREE_UNSIGNED (orig_op0) + shorten = (TREE_UNSIGNED (TREE_TYPE (orig_op0)) || (TREE_CODE (op1) == INTEGER_CST && (TREE_INT_CST_LOW (op1) != -1 || TREE_INT_CST_HIGH (op1) != -1))); @@ -2000,7 +2000,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) on some targets, since the modulo instruction is undefined if the quotient can't be represented in the computation mode. We shorten only if unsigned or if dividing by something we know != -1. */ - shorten = (TREE_UNSIGNED (orig_op0) + shorten = (TREE_UNSIGNED (TREE_TYPE (orig_op0)) || (TREE_CODE (op1) == INTEGER_CST && (TREE_INT_CST_LOW (op1) != -1 || TREE_INT_CST_HIGH (op1) != -1))); |