(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr69195.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O3 -fno-dce -fno-forward-propagate" } */
       3  
       4  void __attribute__ ((noinline, noclone))
       5  foo (int *a, int n)
       6  {
       7    int *lasta = a + n;
       8    for (; a != lasta; a++)
       9      {
      10        *a *= 2;
      11        a[1] = a[-1] + a[-2];
      12      }
      13  }
      14  
      15  int
      16  main ()
      17  {
      18    int a[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
      19    int r[16] = { 1, 2, 6, 6, 16, 24, 44, 80,
      20  		136, 248, 432, 768, 1360, 2400, 4256, 3760 };
      21    unsigned i;
      22    foo (&a[2], 13);
      23    for (i = 0; i < 8; ++i)
      24      if (a[i] != r[i])
      25        __builtin_abort ();
      26    return 0;
      27  }