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

     1  extern void abort ();
     2  
     3  void __attribute__((noinline))
     4  bar (unsigned long long i)
     5  {
     6    if (i)
     7      abort ();
     8  }
     9  
    10  static void __attribute__((always_inline))
    11  foo (unsigned long long *r)
    12  {
    13    int i;
    14  
    15    for (i = 0; ; i++)
    16      if (*r & ((unsigned long long)1 << (63 - i)))
    17        break;
    18  
    19    bar (i);
    20  }
    21  
    22  void __attribute__((noinline))
    23  do_test (unsigned long long *r)
    24  {
    25    int i;
    26  
    27    for (i = 0; i < 2; ++i)
    28      foo (r);
    29  }
    30  
    31  int main()
    32  {
    33    unsigned long long r = 0x8000000000000001ull;
    34  
    35    do_test (&r);
    36    return 0;
    37  }