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] PR 85822 - Fix handling of negative constants


On Sun, 20 May 2018, Yuri Gribov wrote:

> Hi all,
> 
> This fixes PR 85822 by removing incorrect reversal of condition in VRP
> assertion. Bootstrapped and regtested on x86_64.
> 
> Ok for trunk?

Please address the following issues:

Use correct PR reference in Changelog.

Double-check the comment before the function, I think NE_EXPR and EQ_EXPR
should be swapped there.

Address Richard's request from the bug report:

>> Ok, please make sure to say why not doing anything special for negative
>> numbers is ok.

Note there are at least three special cases that are handled incorrectly either
before or after the patch:

 - not two's complement integers
 - mask being 0
 - mask being ~0

Alexander


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