(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
vect/
pr70138-1.c
       1  #include "tree-vect.h"
       2  
       3  double u[33 * 33];
       4  
       5  __attribute__((noinline, noclone)) static void
       6  foo (int *x)
       7  {
       8    double c = 0.0;
       9    int a, b;
      10    for (a = 0; a < 33; a++)
      11      {
      12        for (b = 0; b < 33; b++)
      13  	c = c + u[34 * a];
      14        u[34 * a] *= 2.0;
      15      }
      16    *x = c;
      17  }
      18  
      19  int
      20  main ()
      21  {
      22    int d, e;
      23    check_vect ();
      24    for (d = 0; d < 33 * 33; d++)
      25      {
      26        u[d] = 499.0;
      27        __asm__ volatile ("" : : : "memory");
      28      }
      29    for (d = 0; d < 33; d++)
      30      {
      31        u[d * 34] = (d + 2);
      32        __asm__ volatile ("" : : : "memory");
      33      }
      34    foo (&e);
      35    if (e != 33 * (2 + 34) / 2 * 33)
      36      __builtin_abort ();
      37    return 0;
      38  }