------- Comment #2 from xinliangli at gmail dot com  2008-03-12 21:12 -------
(In reply to comment #1)
> This should be already done.  
> 

With which option? I tried with -O2/-O3, it does not kick in:


int foo(int n, int* p)
{
   int i,s=0;
   int arr[100] = {
1,2,3,3,4,3,3,3,3,5,6,7,1,1,1,1,1,1,1,1,1,11,1,1,11,1,1,1,11,1,1,11,1,1,11,10};

   for ( i = 0; i < n; i++)
   {
           p[i] += arr[i];
           s+=arr[i];
   }
  return s;
}


-- 


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

Reply via email to