modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/20020216-1.c (about) 1 /* PR c/3444 2 This used to fail because bitwise xor was improperly computed in char type 3 and sign extended to int type. */ 4 5 extern void abort (); 6 extern void exit (int); 7 8 signed char c = (signed char) 0xffffffff; 9 10 int foo (void) 11 { 12 return (unsigned short) c ^ (signed char) 0x99999999; 13 } 14 15 int main (void) 16 { 17 if ((unsigned char) -1 != 0xff 18 || sizeof (short) != 2 19 || sizeof (int) != 4) 20 exit (0); 21 if (foo () != (int) 0xffff0066) 22 abort (); 23 exit (0); 24 }