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

     1  
     2  int * foo (int *x, int b)
     3  {
     4  
     5    *(x++) = 55;
     6    if (b)
     7      *(x++) = b;
     8  
     9    return x;
    10  }
    11  
    12  main()
    13  {
    14    int a[5];
    15  
    16    memset (a, 1, sizeof (a));
    17  
    18    if (foo(a, 0) - a != 1 || a[0] != 55 || a[1] != a[4])
    19      abort();
    20  
    21    memset (a, 1, sizeof (a));
    22  
    23    if (foo(a, 2) - a != 2 || a[0] != 55 || a[1] != 2)
    24      abort();
    25  
    26    exit (0);
    27  }