diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-26 06:46:27 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-26 06:46:27 +0000 |
commit | 9375092628642ebde22e7785e814468d94ca6c66 (patch) | |
tree | 5ea89362ae1d48fd7a3c237b789d8f0f38219fd4 | |
parent | ed1601d34c8ee37ce2b37708505de706a5fa9ff7 (diff) | |
download | gcc-9375092628642ebde22e7785e814468d94ca6c66.tar.gz |
PR other/59545
* ira-color.c (update_conflict_hard_regno_costs): Perform the
multiplication in unsigned type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208834 138bc75d-0d04-0410-961f-82ee72b054a4
-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 dc4ebfe38e6..ee0df1c23e9 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 c20aaf72dc6..1f4c96e9a89 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; |