This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem in fixup_var_refs_insns
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc at gcc dot gnu dot org
- Date: Mon, 4 Mar 02 17:26:02 EST
- Subject: Problem in fixup_var_refs_insns
The following small test case generates an ICE on x86:
int
sub1 (char *p, int i)
{
char j = p[i];
{
void
sub2 ()
{
i = 2;
p = p + 2;
}
}
}
The problem is that we form a MEM which has a PLUS, both of whose arms are
REGs that are forced into memory.
When we process the first one (after compiling sub2), we see that the MEM
contains it, so we copy the RTX in the MEM except for the first variable (the
REG which is now a MEM). But then when we come to the second one, the test
for "x == var" fails since we've copied it!
This fails in both 2.8.1 and the current sources.
Any suggestions?