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

     1  /* PR rtl-optimization/70222 */
     2  
     3  #if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
     4  __attribute__((noinline, noclone)) unsigned int
     5  foo (int x)
     6  {
     7    unsigned long long y = -1ULL >> x;
     8    return (unsigned int) y >> 31;
     9  }
    10  #endif
    11  
    12  int
    13  main ()
    14  {
    15  #if __CHAR_BIT__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
    16    if (foo (15) != 1 || foo (32) != 1 || foo (33) != 0)
    17      __builtin_abort ();
    18  #endif
    19    return 0;
    20  }