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
This commit is contained in:
Marek Polacek 2014-03-26 06:46:27 +00:00 committed by Marek Polacek
parent d4fbc3ae80
commit 6686e0bc1e
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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;