Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20020904-1.c

raw
1 /* PR c/7102 */
2
3 /* Verify that GCC zero-extends integer constants
4 in unsigned binary operations. */
5
6 void abort (void);
7
8 typedef unsigned char u8;
9
10 u8 fun(u8 y)
11 {
12 u8 x=((u8)255)/y;
13 return x;
14 }
15
16 int main(void)
17 {
18 if (fun((u8)2) != 127)
19 abort ();
20 return 0;
21 }