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

     1  /* PR tree-optimization/65215 */
     2  
     3  static inline unsigned int
     4  foo (unsigned int x)
     5  {
     6    return (x >> 24) | ((x >> 8) & 0xff00) | ((x << 8) & 0xff0000) | (x << 24);
     7  }
     8  
     9  __attribute__((noinline, noclone)) unsigned int
    10  bar (unsigned long long *x)
    11  {
    12    return foo (*x);
    13  }
    14  
    15  int
    16  main ()
    17  {
    18    if (__CHAR_BIT__ != 8 || sizeof (unsigned int) != 4 || sizeof (unsigned long long) != 8)
    19      return 0;
    20    unsigned long long l = foo (0xdeadbeefU) | 0xfeedbea800000000ULL;
    21    if (bar (&l) != 0xdeadbeefU)
    22      __builtin_abort ();
    23    return 0;
    24  }