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

     1  extern __attribute__ ((__noreturn__)) void exit(int);
     2  extern __attribute__ ((__noreturn__)) void abort(void);
     3  __attribute__ ((__noinline__))
     4  int
     5  add512(int a, int *b)
     6  {
     7    int c = a + 512;
     8    if (c != 0)
     9      *b = a;
    10    return c;
    11  }
    12  
    13  __attribute__ ((__noinline__))
    14  int
    15  add513(int a, int *b)
    16  {
    17    int c = a + 513;
    18    if (c == 0)
    19      *b = a;
    20    return c;
    21  }
    22  
    23  int main(void)
    24  {
    25    int b0 = -1;
    26    int b1 = -1;
    27    if (add512(-512, &b0) != 0 || b0 != -1 || add513(-513, &b1) != 0 || b1 != -513)
    28      abort ();
    29    exit (0);
    30  }