Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/bit1neg-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 struct f
5 {
6 int a:1;
7 };
8
9 void g(struct f *a)
10 {
11 int t = a->a;
12 t = -t;
13 a->a = t;
14 }
15 void g1(struct f *a, int b)
16 {
17 int t = b;
18 t = -t;
19 a->a = t;
20 }
21 /* the 2 negates should have been removed as this is basically the same
22 as (-a) & 1. */
23 /* { dg-final { scan-tree-dump-not " = -" "optimized" } } */