aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-06-15 11:28:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-06-15 11:28:13 +0000
commita577c4054fc7aa9a5228feb6f0bdb37cf31997d5 (patch)
tree78528a56bcceea2c391dcb8920f416c3acc3601f /gcc/expr.c
parent93536c974233d3b400e719aac0d089185e1b5a97 (diff)
downloadgcc-a577c4054fc7aa9a5228feb6f0bdb37cf31997d5.zip
gcc-a577c4054fc7aa9a5228feb6f0bdb37cf31997d5.tar.gz
gcc-a577c4054fc7aa9a5228feb6f0bdb37cf31997d5.tar.bz2
expr.c (expand_expr_real_2): Reduce all integral types to bitfield precision.
2011-06-15 Richard Guenther <rguenther@suse.de> * expr.c (expand_expr_real_2): Reduce all integral types to bitfield precision. (expand_expr_real_1): Likewise. From-SVN: r175078
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index c4bba28..9535c96 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7265,7 +7265,7 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
/* An operation in what may be a bit-field type needs the
result to be reduced to the precision of the bit-field type,
which is narrower than that of the type's mode. */
- reduce_bit_field = (TREE_CODE (type) == INTEGER_TYPE
+ reduce_bit_field = (INTEGRAL_TYPE_P (type)
&& GET_MODE_PRECISION (mode) > TYPE_PRECISION (type));
if (reduce_bit_field && modifier == EXPAND_STACK_PARM)
@@ -8334,7 +8334,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
result to be reduced to the precision of the bit-field type,
which is narrower than that of the type's mode. */
reduce_bit_field = (!ignore
- && TREE_CODE (type) == INTEGER_TYPE
+ && INTEGRAL_TYPE_P (type)
&& GET_MODE_PRECISION (mode) > TYPE_PRECISION (type));
/* If we are going to ignore this result, we need only do something