Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr118483-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* PR tree-optimization/118483 */
4 /* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
5
6 /* This should optimize down to just `return 0;` */
7 /* as `(short)a == ~(short)a` is always false. */
8 int f(int a)
9 {
10 short b = a;
11 int e = ~a;
12 short c = e;
13 return b == c;
14 }