On 08/16/2016 09:57 AM, Jakub Jelinek wrote:
Hi!
When val_so_far is signed, we can end up in UB in various places, e.g.
for the multiplication by 0x7fff, which is done as << 63 shift
followed by subtracting one.
Fixed by computing this in UHWI instead, and only cast at the end to SH
Hi!
When val_so_far is signed, we can end up in UB in various places, e.g.
for the multiplication by 0x7fff, which is done as << 63 shift
followed by subtracting one.
Fixed by computing this in UHWI instead, and only cast at the end to SHWI.
Bootstrapped/regtested on x86_64-linux and