This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]