modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/20020904-1.c (about) 1 /* PR c/7102 */ 2 3 /* Verify that GCC zero-extends integer constants 4 in unsigned binary operations. */ 5 6 typedef unsigned char u8; 7 8 u8 fun(u8 y) 9 { 10 u8 x=((u8)255)/y; 11 return x; 12 } 13 14 int main(void) 15 { 16 if (fun((u8)2) != 127) 17 abort (); 18 return 0; 19 }