REG_INC notes going AWOL during reload
Herman ten Brugge
Haj.Ten.Brugge@net.HCC.nl
Sun Feb 21 09:31:00 GMT 1999
I missed the test program in Michael Hayes bug report. I did sent it
to him so here it is:
char line[4] = { '1', '9', '9', '\0' };
int main()
{
char *ptr = line + 3;
while ((*--ptr += 1) > '9') *ptr = '0';
if (line[0] != '2' || line[1] != '0' || line[2] != '0')
abort();
return 0;
}
I found problems on the c4x and m68k targets. The result on these targets
is '2::' instead of '200'. The store '0' insn is probably removed in flow
because of the missing REG_INC as Michael explained in this bug report.
Probably all targets with auto incr/decr have this problem. Perhaps this
small program could be added to the torture tests.
Herman.
More information about the Gcc-bugs
mailing list