PR63426 Fix various signed integer overflows
authorMarkus Trippelsdorf <markus@trippelsdorf.de>
Thu, 20 Nov 2014 16:36:14 +0000 (16:36 +0000)
committerMarkus Trippelsdorf <trippels@gcc.gnu.org>
Thu, 20 Nov 2014 16:36:14 +0000 (16:36 +0000)
commitd7ca26e4167f1c7abe50041c838111ee4fab15d1
treebd5b144b7bbe1e7b714275f855291e53127e214a
parent46ed60245a76b90e6161134fc6a22480aa1248fe
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.

From-SVN: r217886
gcc/ChangeLog
gcc/config/rs6000/constraints.md
gcc/config/rs6000/predicates.md
gcc/config/rs6000/rs6000.c
gcc/emit-rtl.c
gcc/loop-iv.c
gcc/tree-ssa-loop-ivopts.c
gcc/varasm.c