------- Comment #8 from rguenther at suse dot de 2009-09-03 16:50 ------- Subject: Re: [4.5 Regression] miscompilation at -O2
On Thu, 3 Sep 2009, matz at gcc dot gnu dot org wrote: > ------- Comment #7 from matz at gcc dot gnu dot org 2009-09-03 16:39 ------- > Hmm, in a sense what forward prop is doing is at least fishy. It forwards > the casted ADDR_EXPR into some references of y_13, but not into all of them. > As y_13 is a restrict pointer this is always going to be a problem, because > suddenly you have accesses to the object via that restrict pointer and via > something else not based on that pointer. > > Either forward prop needs to forward this into _all_ y_13 uses or into none. That won't help. The canonical counter-example would be that the caller already accesses the plain y and z variables. That forwprop "simulates" this is just unfortunate. I'll nevertheless look into the forwprop issue - but that will just fix this particular testcase without addressing the real problem. Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41212