This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR rtl-optimization/15248 -- semi-latent reload bug
On 4/21/05, Jeffrey A Law <law@redhat.com> wrote:
> On Thu, 2005-04-21 at 10:39 +0200, Bernd Schmidt wrote:
> > Jeffrey A Law wrote:
> > > As mentioned in the PR, when we create equivalences between a pseudo
> > > and read-only memory we run the risk of emitting an instruction which
> > > attempts to store into the read-only memory location. That is clearly
> > > bad since storing into a read-only memory location will typically
> > > generate a segfault.
> >
> > Jeff, do you have a test case for this? I'm still slightly puzzled by
> > this issue.
> You need to have a patch to tree-ssa-dom.c, given that the testcase
> is pretty trivial since compiler won't bootstrap.
>
> It's a pretty simple problem really -- if a pseudo does not get a hard
> register we replace the pseudo with its equivalent memory location.
> That's standard reload behavior. ie, ever use/set of the pseudo is
> replaced with a use/set of its equivalent memory location.
>
> The problem occurs when the equivalent memory location is readonly
> memory. An assignment to readonly memory is, umm, bad.
I guess the real question is then, why and where do we create this SETs
to the pseudo (and thus the memory location) in the first place - apart
from the first initialization of the pseudo, of course - or does that get
replaced with mem = mem, too?
Richard.