view gcc/testsuite/gcc.c-torture/compile/xorn.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

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));
}