Bug in GCC

Eric Botcazou ebotcazou@libertysurf.fr
Fri Feb 7 10:46:00 GMT 2003


> #define TASK_MEMORY_START  0x1000000
> #define MAX_TASK_MEMORY   (512<<12) /* Max 512MB */
>
>  TASK_MEMORY_BEGIN=TASK_MEMORY_START;
>
>  for(i=TASK_MEMORY_BEGIN;i<MAX_TASK_MEMORY;i+=1024,p+=1024)
>  {
>   *p=0x1BADB002;
>   if((*p)!=0x1BADB002) break;
>  }

This loop can be reduced to:

i  = TASK_MEMORY_BEGIN;

hence the resulting assembly code.

-- 
Eric Botcazou



More information about the Gcc-bugs mailing list