Problem in fixup_var_refs_insns
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Mon Mar 4 14:29:00 GMT 2002
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?
More information about the Gcc
mailing list