------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni 
dot cz  2004-12-15 12:52 -------
Subject: Re:  [3.4/4.0 Regression] Loops with power of two step and variable 
bounds not unrolled

> ------- Additional Comments From chris at bubblescope dot net  2004-12-15 
> 12:28 -------
> Also (stating the perhaps blindingly obvious), this bug is not being caused by
> the fact that the loop contains a return statement.
> 
> int check(int* a,int *b)
> {
> int* returnval=b;
> for(;a<b;++a)
>   if(*a) returnval=a;
> return returnval;
> }
> 
> Also is not optimised.
> 
> Out of interest, surely when the loop actually involves pointers, then 
> "looping
> a pointer around the end of memory" is undefined behaviour, and therefore this
> doesn't have to be considered in terms of optimising (although this won't help
> the case in the original bug report).

And it won't help at all, since on rtl we no longer have a reliable
information about pointers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19001

Reply via email to