This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][4.3] RFC - Fix PR40141, backport alias fixes around ref-all pointers, backport struct with complex argument passing (i?86, x86_64)
On Mon, 18 May 2009, Eric Botcazou wrote:
> > This fixes PR40141, a report for the 4.3 branch that ref-all pointers
> > do not work properly. This was fixed for 4.4 by me and I am not aware
> > of followup issues with the fixes. On the other hand the changes are
> > not minor - but getting the fallback ref-all case correct seems important.
> >
> > This also backports the i386 backend part of the fix for PR38151 (I can
> > do without that, but then have to remove the testcase checking the
> > ref-all fix for i386 varargs).
> >
> > Bootstrapped and tested on {x86_64,i586,ppc,ppc64,s390,s390x}-linux.
> > I have put this into our openSUSE 4.3 package. How do people feel
> > with this kind of non-trivial changes late in the 4.3 series?
>
> This indeed seems a little risky at this point. Does it show up only with
> __attribute__((may_alias))?
Yes, it is all __attribute__((may_alias)) related. Implementation-wise
it is not even a regression (it was broken before, just nobody run into it
yet). The testcase at hand is a regression though.
Apart from the hunk regarding
! /* We used to skip variables that have never been written to
! if the memory tag has been never written to directly (or
! either of them were call clobbered). This is not enough
! though, as this misses writes through the tags aliases.
! So, for correctness we need to include any aliased
! variable here. */
it only can affect code that uses may_alias. Unfortunately without the
above the testcase is not fixed. That particular change may in turn
change partitioning behavior on code not using the may_alias attribute
and thus uncover latent bugs (which is why I asked for opinions - were it
really only may_alias related changes I wouldn't have bothered...)
The bad thing about this bug is of course that there is no workaround
apart from using -O0.
Richard.