Debian Codegraph @

gcc/testsuite/gcc.c-torture/compile/xorn.c

raw
1 /* { dg-additional-options "-std=gnu89" } */
2
3 int
4 xorn (a, b)
5 int a, b;
6 {
7 return a ^ ~b;
8 }
9
10 int
11 not (a)
12 int a;
13 {
14 return ~a;
15 }
16
17 int
18 xor (a, b)
19 int a, b;
20 {
21 return a ^ b;
22 }
23
24 main ()
25 {
26 int i, j;
27
28 for (i = 0; i <= 1; i++)
29 for (j = 0; j <= 1; j++)
30 printf ("%d op %d = %d = %d?\n", i, j,
31 1 & xor (i, not (j)),
32 1 & xorn (i, j));
33 }