modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr56962.c (about)

     1  /* PR tree-optimization/56962 */
     2  
     3  extern void abort (void);
     4  long long v[144];
     5  
     6  __attribute__((noinline, noclone)) void
     7  bar (long long *x)
     8  {
     9    if (x != &v[29])
    10      abort ();
    11  }
    12  
    13  __attribute__((noinline, noclone)) void
    14  foo (long long *x, long y, long z)
    15  {
    16    long long a, b, c;
    17    a = x[z * 4 + y * 3];
    18    b = x[z * 5 + y * 3];
    19    c = x[z * 5 + y * 4];
    20    x[y * 4] = a;
    21    bar (&x[z * 5 + y]);
    22    x[z * 5 + y * 5] = b + c;
    23  }
    24  
    25  int
    26  main ()
    27  {
    28    foo (v, 24, 1);
    29    return 0;
    30  }