This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in GCC


> #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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]