Bug in loop optimize (invalid postinc to preinc transformation)

Richard Henderson rth@redhat.com
Fri Dec 29 00:52:00 GMT 2000


On Fri, Dec 29, 2000 at 06:18:26AM -0000, Dave Korn wrote:
> >int main(void) {
> >   do {
> >  i++;
> >  } while(p++<(unsigned char *)0xffffffff);
[...]
>   Now, what follows is from the n869 draft of the C9X standard....

All this is well and good, except that I don't believe
that it was ever claimed that this program was supposed
to be strictly conforming.

What is being lost sight of is that GCC is also used to 
develop programs in non-hosted situations.  In these
situations it is Known how the address space is shaped,
and we often do Very Nonconforming Things with addresses.

I don't see any particular reason why GCC should fail
this test.  It just makes things less useful.


r~


More information about the Gcc mailing list