aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1993-02-20 22:24:44 +0000
committerDoug Evans <dje@gnu.org>1993-02-20 22:24:44 +0000
commit5709eb48d8c7a80b9463bd6aa58cea66f2f84672 (patch)
tree7531c9d0147ba58fcb911a9d5a0a5a037b00de4a /gcc/fold-const.c
parent9f8b265dd55f81abb5892d0e33a15ad641b9be41 (diff)
downloadgcc-5709eb48d8c7a80b9463bd6aa58cea66f2f84672.zip
gcc-5709eb48d8c7a80b9463bd6aa58cea66f2f84672.tar.gz
gcc-5709eb48d8c7a80b9463bd6aa58cea66f2f84672.tar.bz2
(decode_field_reference): Use force_fit_type instead of convert to avoid truncated integer warning.
* (decode_field_reference): Use force_fit_type instead of convert to avoid truncated integer warning. From-SVN: r3501
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 5a7aa46..4708f88 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2430,7 +2430,9 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
tree unsigned_type = type_for_size (*pbitsize, 1);
int precision = TYPE_PRECISION (unsigned_type);
- mask = convert (unsigned_type, build_int_2 (~0, ~0));
+ mask = build_int_2 (~0, ~0);
+ TREE_TYPE (mask) = unsigned_type;
+ force_fit_type (mask);
mask = const_binop (LSHIFT_EXPR, mask, size_int (precision - *pbitsize), 0);
mask = const_binop (RSHIFT_EXPR, mask, size_int (precision - *pbitsize), 0);
}