modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/20050111-1.c (about) 1 /* PR middle-end/19084, rtl-optimization/19348 */ 2 3 unsigned int 4 foo (unsigned long long x) 5 { 6 unsigned int u; 7 8 if (x == 0) 9 return 0; 10 u = (unsigned int) (x >> 32); 11 return u; 12 } 13 14 unsigned long long 15 bar (unsigned short x) 16 { 17 return (unsigned long long) x << 32; 18 } 19 20 extern void abort (void); 21 22 int 23 main (void) 24 { 25 if (sizeof (long long) != 8) 26 return 0; 27 28 if (foo (0) != 0) 29 abort (); 30 if (foo (0xffffffffULL) != 0) 31 abort (); 32 if (foo (0x25ff00ff00ULL) != 0x25) 33 abort (); 34 if (bar (0) != 0) 35 abort (); 36 if (bar (0x25) != 0x2500000000ULL) 37 abort (); 38 return 0; 39 }