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 middle-end/19698] [3.3/3.4/4.0 regression] Infinite loop in update_life_info


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-30 23:00 -------
(In reply to comment #7)
> Triggered by this change: 
I think that only added the pure attribute on __builtin_cos.
You might want to try this testcase which shows the problem without a builtin:
float f(float) __attribute__((__pure__));
void FFT(int NumSamples, float *RealOut, float ar1)
{
  int i, j, n;
  int BlockSize, BlockEnd;
  if (NumSamples <= 1)
    return;

  i = 0;
  L1:
    RealOut[i] = (RealOut == 0) ? 0.0 : RealOut[i];
    i++;
  if (NumSamples <= i) goto L1;

  BlockEnd = 1;
  for (BlockSize = 2; BlockSize <= NumSamples; BlockSize *=2)
  {
    float cm1 = f(-1.0);
    for (i = 0; i < NumSamples; i += BlockSize)
      for (j = i, n = 0; n < BlockEnd; j++, n++)
        RealOut[j] =  cm1 * ar1;
    BlockEnd = BlockSize;
  }
}

-- 


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


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