Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/dce-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cddce1 -ffinite-loops" } */
3
4 typedef struct list {
5 char pad[15];
6 struct list *next;
7 } list;
8
9 int data;
10
11 list *head, *tail;
12
13 int __attribute__((pure)) pfn (int);
14
15 int foo (unsigned u, int s)
16 {
17 unsigned i;
18 list *p;
19 int j;
20
21 for (i = 0; i < u; i += 2)
22 ;
23
24 for (p = head; p; p = p->next)
25 ;
26
27 for (j = data; j & s; j = pfn (j + 3))
28 ;
29
30 for (p = head; p != tail; p = p->next)
31 for (j = data + 1; j > s; j = pfn (j + 2))
32 ;
33
34 return 0;
35 }
36 /* { dg-final { scan-tree-dump-not "if" "cddce1"} } */
37