This is the mail archive of the 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] for PR14784

On 10/23/06, Zdenek Dvorak <> wrote:

this PR is caused by the fact that we do not realize that

type *x;
struct {type *y,...} *z;

x = something;
use (z->y);

the definition x does not alias the use of z->y.  This is because
the pruning code in access_can_touch_variable requires the type of the
pruned variable not to be a pointer.  This however does not make much
sense to me -- the variable stands for itself, not the place it points
to, so there is no reason to handle pointers specially.
This was not the reason it was added ...

One problem that surfaced when I disabled the check is that heapvar has pointer type, but we do not want it pruned here; this is easy to fix by checking for it in access_can_touch_variable.

Another problem was PR 29156; that is now fixed.

... these two were.  It would get answers the rest of the middle end
was unhappy with when you pruned derefences that could touch non-local
variables (which include heap variables that escape).  Now that this
is fixed, you are right that there is no real need for the check other
than to make sure heap-vars don't get pruned out.

Bootstrapped & regtested on i686 and x86_64.

This is fine.

BTW, if either of you know the correct set of objects a FILTER_EXPR or
EXC_PTR_EXPR can return, adding that to get_constraint_for would make
points-to work about 100x better on most C++ programs :)
(This is more or less the last cause of points-to anything)

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