modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/pr40057.c (about) 1 /* PR middle-end/40057 */ 2 3 extern void abort (void); 4 5 __attribute__((noinline)) int 6 foo (unsigned long long x) 7 { 8 unsigned long long y = (x >> 31ULL) & 1ULL; 9 if (y == 0ULL) 10 return 0; 11 return -1; 12 } 13 14 __attribute__((noinline)) int 15 bar (long long x) 16 { 17 long long y = (x >> 31LL) & 1LL; 18 if (y == 0LL) 19 return 0; 20 return -1; 21 } 22 23 int 24 main (void) 25 { 26 if (sizeof (long long) != 8) 27 return 0; 28 if (foo (0x1682a9aaaULL)) 29 abort (); 30 if (!foo (0x1882a9aaaULL)) 31 abort (); 32 if (bar (0x1682a9aaaLL)) 33 abort (); 34 if (!bar (0x1882a9aaaLL)) 35 abort (); 36 return 0; 37 }