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]

[Bug tree-optimization/24309] [4.1 Regression] ICE with -O3 -ftree-loop-linear



------- Comment #8 from jean-marc dot valin at usherbrooke dot ca  2005-11-02 01:07 -------
OK, I'm not sure whether it's the same bug but when compiling the following
code with 
% gcc-4.1-20051029 -O2 -ftree-loop-linear -c vq.c

int vq_index(float *in, const float *codebook, int len, int entries)
{
   int i,j;
   float min_dist=0;
   int best_index=0;
   for (i=0;i<entries;i++)
   {
      float dist=0;
      for (j=0;j<len;j++)
      {
         float tmp = in[j]-*codebook++;
         dist += tmp*tmp;
      }
      if (i==0 || dist<min_dist)
      {
         min_dist=dist;
         best_index=i;
      }
   }
   return best_index;
}

The main difference is that the above example with quant_lsp.c only gets
triggered at -O3, whereas vq.c triggers the bug at -O2. Both files are part of
the same software (Speex) BTW.


-- 


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


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