diff options
author | Marek Polacek <polacek@redhat.com> | 2014-03-26 06:46:27 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-03-26 06:46:27 +0000 |
commit | 6686e0bc1e8b83aed19f383b527bc67b5ba53480 (patch) | |
tree | 5ea89362ae1d48fd7a3c237b789d8f0f38219fd4 /gcc | |
parent | d4fbc3ae802ec29f589ef2de81992c57c5d87058 (diff) | |
download | gcc-6686e0bc1e8b83aed19f383b527bc67b5ba53480.zip gcc-6686e0bc1e8b83aed19f383b527bc67b5ba53480.tar.gz gcc-6686e0bc1e8b83aed19f383b527bc67b5ba53480.tar.bz2 |
re PR other/59545 (Signed integer overflow issues)
PR other/59545
* ira-color.c (update_conflict_hard_regno_costs): Perform the
multiplication in unsigned type.
From-SVN: r208834
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ira-color.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dc4ebfe..ee0df1c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-03-26 Marek Polacek <polacek@redhat.com> + + PR other/59545 + * ira-color.c (update_conflict_hard_regno_costs): Perform the + multiplication in unsigned type. + 2014-03-26 Chung-Ju Wu <jasonwucj@gmail.com> * doc/install.texi: Document nds32le-*-elf and nds32be-*-elf. diff --git a/gcc/ira-color.c b/gcc/ira-color.c index c20aaf7..1f4c96e 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -1505,7 +1505,7 @@ update_conflict_hard_regno_costs (int *costs, enum reg_class aclass, index = ira_class_hard_reg_index[aclass][hard_regno]; if (index < 0) continue; - cost = conflict_costs [i] * mult / div; + cost = (int) ((unsigned) conflict_costs [i] * mult) / div; if (cost == 0) continue; cont_p = true; |