aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr110637-3.c
blob: ce80146d9df008f57fbed6beebc5b52c403ecdc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
int f(int a)
{
        int b = a & 1;
        int c = b == 0;
        int d = ~a;
        int e = d & 1;
        return c == e;
}

/* This should be optimized to just `return 1` */
/* { dg-final { scan-tree-dump-not " == " "optimized"} } */
/* { dg-final { scan-tree-dump-times "return 1" 1 "optimized"} } */