Re: [PATCH] Fix UB in expmed.c (PR middle-end/61903)

2014-08-29 Thread Jeff Law
On 08/25/14 13:21, Marek Polacek wrote: The following ought to fix two spots where an undefined behavior can occur when compiling pr28045.c with instrumented compiler. It does so by changing the type of V to an unsigned HOST_WIDE_INT and performing the shift on unsigned HOST_WIDE_INT. Hopefully i

[PATCH] Fix UB in expmed.c (PR middle-end/61903)

2014-08-25 Thread Marek Polacek
The following ought to fix two spots where an undefined behavior can occur when compiling pr28045.c with instrumented compiler. It does so by changing the type of V to an unsigned HOST_WIDE_INT and performing the shift on unsigned HOST_WIDE_INT. Hopefully it doesn't break anything... Bootstrapped/