aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/binop-notand1a.c
blob: 2d8202a0c13370dccd9a0b866d928b3cb8b16681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int
foo (char a, unsigned short b)
{
  return (a & !a) | (b & !b);
}

/* As long as comparisons aren't boolified and casts from boolean-types
   aren't preserved, the folding of  X & !X to zero fails.  */
/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */