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

     1  /* PR tree-optimization/78720 */
     2  
     3  __attribute__((noinline, noclone)) long int
     4  foo (signed char x)
     5  {
     6    return x < 0 ? 0x80000L : 0L;
     7  }
     8  
     9  __attribute__((noinline, noclone)) long int
    10  bar (signed char x)
    11  {
    12    return x < 0 ? 0x80L : 0L;
    13  }
    14  
    15  __attribute__((noinline, noclone)) long int
    16  baz (signed char x)
    17  {
    18    return x < 0 ? 0x20L : 0L;
    19  }
    20  
    21  int
    22  main ()
    23  {
    24    if (foo (-1) != 0x80000L || bar (-1) != 0x80L || baz (-1) != 0x20L
    25        || foo (0) != 0L || bar (0) != 0L || baz (0) != 0L
    26        || foo (31) != 0L || bar (31) != 0L || baz (31) != 0L)
    27      __builtin_abort ();
    28    return 0;
    29  }