Re: [PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Vladimir Makarov
On 2014-06-27, 3:16 AM, Jakub Jelinek wrote: Hi! This fixes the most common source of the new runtime diagnostics during bootstrap-ubsan, if num is 0, ira_object_id_map is often 0 as well. Ok for trunk/4.9? Sure, Jakub. You can use num > 1 as Richard pointed out. Thanks. 2014-06-27 Jaku

Re: [PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Jakub Jelinek
On Fri, Jun 27, 2014 at 11:34:48AM +0200, Richard Biener wrote: > On Fri, Jun 27, 2014 at 9:16 AM, Jakub Jelinek wrote: > > Hi! > > > > This fixes the most common source of the new runtime diagnostics > > during bootstrap-ubsan, if num is 0, ira_object_id_map is often > > 0 as well. > > > > Ok for

Re: [PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Richard Biener
On Fri, Jun 27, 2014 at 9:16 AM, Jakub Jelinek wrote: > Hi! > > This fixes the most common source of the new runtime diagnostics > during bootstrap-ubsan, if num is 0, ira_object_id_map is often > 0 as well. > > Ok for trunk/4.9? If it's also sometimes 1 then why not if (num > 1) - just as optimi

[PATCH] Fix undefined behavior in ira-build.c

2014-06-27 Thread Jakub Jelinek
Hi! This fixes the most common source of the new runtime diagnostics during bootstrap-ubsan, if num is 0, ira_object_id_map is often 0 as well. Ok for trunk/4.9? 2014-06-27 Jakub Jelinek * ira-build.c (sort_conflict_id_map): Don't call qsort if num is 0, as ira_object_id_map

Re: [PATCH] Fix undefined behavior in IRA

2014-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2014 at 10:27:37PM +0100, Marc Glisse wrote: > On Tue, 25 Mar 2014, 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 i

Re: [PATCH] Fix undefined behavior in IRA

2014-03-26 Thread Marc Glisse
On Tue, 25 Mar 2014, 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.

Re: [PATCH] Fix undefined behavior in IRA

2014-03-25 Thread Vladimir Makarov
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

[PATCH] Fix undefined behavior in IRA

2014-03-25 Thread Marek Polacek
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 f