This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix undefined behavior in IRA


On 2014-03-25, 12:14 PM, Marek Polacek wrote:
This is a temporary fix for UB in IRA, where ubsan complains because
there's signed iteger overflow in the multiplication.  To shut this
error up, we can perform the multiplication in unsigned and only then
cast the result of the multiplication to int.

Regtested/bootstrapped on x86_64-linux, ok for trunk?


Ok. Thanks, Marek.

2014-03-25  Marek Polacek  <polacek@redhat.com>

	PR other/59545
	* ira-color.c (update_conflict_hard_regno_costs): Perform the
	multiplication in unsigned type.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]