aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@pierdol.cobaltmicro.com>1998-08-22 03:17:56 +0000
committerDavid S. Miller <davem@gcc.gnu.org>1998-08-21 20:17:56 -0700
commit172f4957e10213b5ca7f7d4142b53ab4bd5619a4 (patch)
tree9e6f79953eb62e72578443d69c7ed643b1ff4023 /gcc/expmed.c
parent553e18537e63b72a65281c3bbe24b778e5fcb1a7 (diff)
expmed.c (make_tree): Sign extend even if TREE_UNSIGNED...
* expmed.c (make_tree) [CONST_INT]: Sign extend even if TREE_UNSIGNED, when bitsize of type's mode is larger than HOST_BITS_PER_WIDE_INT. From-SVN: r21904
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 2f656c281f1..c6efd6257d7 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3767,7 +3767,9 @@ make_tree (type, x)
{
case CONST_INT:
t = build_int_2 (INTVAL (x),
- TREE_UNSIGNED (type) || INTVAL (x) >= 0 ? 0 : -1);
+ (TREE_UNSIGNED (type)
+ && (GET_MODE_BITSIZE (TYPE_MODE (type)) < HOST_BITS_PER_WIDE_INT))
+ || INTVAL (x) >= 0 ? 0 : -1);
TREE_TYPE (t) = type;
return t;