summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp57.c
blob: cac37835dac3848483160ee72fbf5d615d77e7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR40052 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vrp -fno-tree-ccp -fdump-tree-optimized" } */

int foo(_Bool b)
{
    return b | 1;
}

int bar(_Bool b)
{
    return b & -2;
}

/* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */