diff options
author | Martin Liska <mliska@suse.cz> | 2016-10-06 09:33:49 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-10-06 07:33:49 +0000 |
commit | ac2a97db4b862579d6fea2e97000650bfe9b4659 (patch) | |
tree | bef19c5954ca2ecbf1d78780934c0e031fb1632f /gcc/expmed.h | |
parent | a7773b4d0629c6ab0d8321c9b018f6a718bf232a (diff) | |
download | gcc-ac2a97db4b862579d6fea2e97000650bfe9b4659.zip gcc-ac2a97db4b862579d6fea2e97000650bfe9b4659.tar.gz gcc-ac2a97db4b862579d6fea2e97000650bfe9b4659.tar.bz2 |
Fix warnings for make profiledbootstrap (PR bootstrap/77788)
PR bootstrap/77788
* expmed.h (mul_highpart_cost_ptr): Add an gcc_assert.
* gimple-ssa-strength-reduction.c (slsr_process_cast):
Initialize a pointer to NULL.
(slsr_process_copy): Likewise.
* input.c (location_get_source_line): Likewise.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
From-SVN: r240827
Diffstat (limited to 'gcc/expmed.h')
-rw-r--r-- | gcc/expmed.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expmed.h b/gcc/expmed.h index cbceaf1..8d0af3c 100644 --- a/gcc/expmed.h +++ b/gcc/expmed.h @@ -618,8 +618,10 @@ static inline int * mul_highpart_cost_ptr (bool speed, machine_mode mode) { gcc_assert (GET_MODE_CLASS (mode) == MODE_INT); + int m = mode - MIN_MODE_INT; + gcc_assert (m < NUM_MODE_INT); - return &this_target_expmed->x_mul_highpart_cost[speed][mode - MIN_MODE_INT]; + return &this_target_expmed->x_mul_highpart_cost[speed][m]; } /* Set the COST for computing the high part of a multiplication in MODE |