This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix VRP with -fno-delete-null-pointer-checks (PR c/88367)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Dec 2018 16:51:16 -0700
- Subject: Re: [PATCH] Fix VRP with -fno-delete-null-pointer-checks (PR c/88367)
- References: <20181206064535.GN12380@tucnak> <firstname.lastname@example.org> <20181206203252.GX12380@tucnak>
On 12/6/18 1:32 PM, Jakub Jelinek wrote:
>> For -fno-delete-null-pointer-checks ISTM
>> we should indicate "we don't know anything about the result" of such an
> There are cases where we still know something. The largest valid object
> that can be supported is half of the address space, so without pointer
> wrapping, positive additions to the pointer shouldn't wrap around and yield
> NULL, negative ones can. With -fwrapv-pointers anything can happen, sure,
> the only case handled in that case is &[ptr + 0] if ptr is ~[0, 0] then
> &[ptr + 0] is also ~[0, 0].
Yea. I just didn't figure those were worth worrying about.