Sun Chan wrote: > the wrap_around_unsafe flag is supposed to be used to guard that. > Also, it is supposed to be turn off for O3, as I recall > sun > I don't believe that LNO used that. Also, I would think the compiler should be more conservative in allowing that "n" might be a small positive number than in allowing that "n" might be close to 2^31.
Dror > On Wed, Sep 22, 2010 at 4:57 AM, Dror Maydan <may...@tensilica.com> wrote: > >> We ran into the following bug. >> >> int a[1024]; >> void r(unsigned int n) >> { >> unsigned int i,j; >> for (i=0; i<n; i++) { >> for (j=0; j<n; j++) { >> a[i]++; >> } >> } >> } >> >> >> At -O3, LNO outer unrolls the outer loop by setting the bound to >> "i<n-u+1", creating an infinite loop whenever "n" is less than the >> unroll factor. My memory is faded, but I thought it wasn't supposed to >> do that for unsigned loops. From a quick scan of the code, I didn't >> find anything that checks. Anyone have experience with this or a better >> recollection than I do? >> >> Dror >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> Open64-devel mailing list >> Open64-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/open64-devel >> >> ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel