diff options
author | trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-20 16:36:14 +0000 |
---|---|---|
committer | trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-20 16:36:14 +0000 |
commit | 06b8401d563d626786964701f16ced1008d39593 (patch) | |
tree | bd5b144b7bbe1e7b714275f855291e53127e214a /gcc/emit-rtl.c | |
parent | 650ad49efde0cfb457804acae1acd8d86f921fd4 (diff) | |
download | gcc-06b8401d563d626786964701f16ced1008d39593.tar.gz |
PR63426 Fix various signed integer overflows
Running the testsuite after bootstrap-ubsan on gcc112 shows several issues. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426 for the full list.
This patch fixes several of them.
2014-11-20 Markus Trippelsdorf <markus@trippelsdorf.de>
* config/rs6000/constraints.md: Avoid signed integer overflows.
* config/rs6000/predicates.md: Likewise.
* config/rs6000/rs6000.c (num_insns_constant_wide): Likewise.
(includes_rldic_lshift_p): Likewise.
(includes_rldicr_lshift_p): Likewise.
* emit-rtl.c (const_wide_int_htab_hash): Likewise.
* loop-iv.c (determine_max_iter): Likewise.
(iv_number_of_iterations): Likewise.
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Likewise.
* varasm.c (get_section_anchor): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217886 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 1226aad0c13..fa5e41beb46 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -220,7 +220,7 @@ hashval_t const_wide_int_hasher::hash (rtx x) { int i; - HOST_WIDE_INT hash = 0; + unsigned HOST_WIDE_INT hash = 0; const_rtx xr = x; for (i = 0; i < CONST_WIDE_INT_NUNITS (xr); i++) |