diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-08-13 14:39:54 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-08-13 14:39:54 +0200 |
commit | eb87c7c4890b87d5f228b9261c2e3b3a5b81acd7 (patch) | |
tree | ad4832638401fe5e5c7f1ec4cd85012761658f24 /gcc/simplify-rtx.c | |
parent | 6a9573cc7b1d527e61f4ef7900c0a1c21203e24a (diff) | |
download | gcc-eb87c7c4890b87d5f228b9261c2e3b3a5b81acd7.tar.gz |
re PR c/53968 (integer undefined behaviors in GCC)
PR c/53968
* tree.c (integer_pow2p): Avoid undefined signed overflows.
* simplify-rtx.c (neg_const_int): Likewise.
* expr.c (fixup_args_size_notes): Likewise.
* stor-layout.c (set_min_and_max_values_for_integral_type): Likewise.
* double-int.c (mul_double_wide_with_sign): Likewise.
(double_int_mask): Likewise.
* tree-ssa-loop-ivopts.c (get_address_cost): Likewise.
From-SVN: r190342
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index f56a5edef8f..16dbd8a03ea 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -66,7 +66,7 @@ static rtx simplify_binary_operation_1 (enum rtx_code, enum machine_mode, static rtx neg_const_int (enum machine_mode mode, const_rtx i) { - return gen_int_mode (- INTVAL (i), mode); + return gen_int_mode (-(unsigned HOST_WIDE_INT) INTVAL (i), mode); } /* Test whether expression, X, is an immediate constant that represents |