Fix old thinko in choose_multiplier

Eric Botcazou ebotcazou@adacore.com
Wed Jul 4 12:57:00 GMT 2018


As spotted by the reporter of the bug, there is a small thinko at the end of 
choose_multiplier whereby the (N + 1)th bit of the result is set when the 
computed value is exactly 2**N.  But it turns out that this case can never 
actually happen given how the function is invoked in the compiler.

Bootstrapped/regtested on x86-64/Linux, applied on the mainline as obvious.


2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>

	PR middle-end/86380
	* expmed.c (choose_multiplier): Fix incorrect comparison with mask.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 430 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180704/165364c8/attachment.bin>


More information about the Gcc-patches mailing list