aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/unsorted/xorn.c
blob: d7b75f936bd5d2711f5da08955f3f16cb87df178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
int
xorn (a, b)
     int a, b;
{
  return a ^ ~b;
}

int
not (a)
     int a;
{
  return ~a;
}

int
xor (a, b)
     int a, b;
{
  return a ^ b;
}

main ()
{
  int i, j;

  for (i = 0;  i <= 1;  i++)
    for (j = 0;  j <= 1;  j++)
      printf ("%d op %d = %d = %d?\n", i, j,
	      1 & xor (i, not (j)),
	      1 & xorn (i, j));
}