[PATCH] fix powerpc64le bootstrap failure caused by r243661 (PR 78817)

Jeff Law law@redhat.com
Fri Dec 16 20:13:00 GMT 2016


On 12/16/2016 12:08 PM, Jakub Jelinek wrote:
> On Fri, Dec 16, 2016 at 07:00:06PM +0000, Joseph Myers wrote:
>> On Fri, 16 Dec 2016, Martin Sebor wrote:
>>
>>> I don't claim it can't be improved but it seems pretty good as
>>> it is already.  Among the 6 instances it's found in GCC three
>>> look like real bugs.
>>
>> FWIW it's found at least one real bug in glibc
>> <https://sourceware.org/bugzilla/show_bug.cgi?id=20978> - that's a case
>> where strlen is called on a pointer that can never be non-null if the
>> strlen call is reached.  (I don't know if there are other cases in glibc,
>> whether genuine bugs or false positives, that would appear later in the
>> build once that bug is fixed.)
>
> Thanks.  Reduced to something like:
> int
> foo (const char *name)
> {
>   if (name)
>     return 6;
>   return __builtin_strlen (name);
> }
> This is warned about both with Martin's late warning and my after ccp2
> warning version.  We should include it in gcc testsuite.
I'll note this is an example of a case where Andrew's work would likely 
help because it allows us to ask for a range of name_XX at the return 
statement and it'll give us back a range that is constrained by the 
path(s) which reach the return statement.

Contrast to the current VRP work where each SSA_NAME has a range, but 
that range must be valid for every context in which that SSA_NAME appears.

jeff



More information about the Gcc-patches mailing list