On Tue, Aug 24, 2021 at 1:41 AM Martin Sebor via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> When determining the properties of objects referenced by a PHI's
> arguments, compute_objsize() has logic to filter out null pointers.
> It also has special logic that tries to deal with arguments that
> refer to the same object (as opposed to different objects).  A bug
> in the former prevents the function from clearing the flag called
> BASE0 that indicates that the identities of all the objects are
> known.  The latter logic turns out to be redundant but its presence
> make the logic in the function harder to follow.
>
> The attached patch corrects the former logic by resetting the BASE0
> flag for a PHI result if it's clear for any of its arguments.  It
> also does away with the latter logic, simplifying the code.  Testing
> the patch exposed a couple of other, minor, bugs in using an object's
> total size without considering an offset into it, and failing to reset
> members of reused access_ref objects.
>
> Tested on x86_64-linux.

OK.

Richard.

> Martin

Reply via email to