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] Fix call-clobbering (PRs 36373 and 36387)


On Sat, 31 May 2008, Richard Guenther wrote:

> On Fri, 30 May 2008, Daniel Berlin wrote:
> 
> > Something like the attached should fix the points-to results (I may
> > have missed some is_special_var cases to remove, etc)
> 
> Thanks.  I'll see if that fixes the wrong points-to results.  It
> would be nice to not need the "fixup" thing.  Note that it really
> needs to make sure all reachable memory is marked as points-to-anything.
> 
> The testsuite/gcc.dg/pr32328.c tests exactly this situation, you can
> "extend" it by adding more indirection.
> 
> That is, the following variant currently fails (the store to
> barptr->some_string is removed):
> 
> struct barstruct { char const* some_string; };
> 
> void changethepointer(struct barstruct***);
> 
> void baz()
> {
>   struct barstruct bar1;
>   struct barstruct* barptr = &bar1;
>   struct barstruct** barptr2 = &barptr;
>   changethepointer(&barptr2);
>   barptr->some_string = "Everything OK";
> }
> 
> I have opened PR36400 for the wrong points-to results issue and
> assigned you to it.

The patch seems to work.  Of course it fixes none of the call-clobber
related PRs or testcases.  But still nice!

Thanks,
Richard.


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