(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
torture/
pr77478.c
       1  /* { dg-do run } */
       2  /* { dg-additional-options "-ffast-math" } */
       3  
       4  static const float A[10] = {1};
       5  
       6  float
       7  foo(float *f, int n)
       8  {
       9    int i, j;
      10    float a = 0, b = 0;
      11    for (i = n/2; i < n; i++)
      12      a += f[i]*.1f;
      13    for (i = n/2, j = 0; i < n; i++, j++)
      14      b += f[i]*A[j]+a*A[j];
      15    return b;
      16  }
      17  
      18  int main()
      19  {
      20    float a[21] = {0};
      21    return foo(a+1, 20) + foo(a, 20);
      22  }