Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-thread-22.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Os -fdump-tree-optimized" } */
3 /* PR tree-optimization/107823 */
4 /* With jump threading across the loop header,
5 we should figure out that b is always 0 and remove
6 the call to foo. */
7
8 int a;
9 void bar64_(void);
10 void foo();
11 int main() {
12 signed char b = a = 6;
13 for (; a; a = 0) {
14 bar64_();
15 b = 0;
16 }
17 if (b <= 0)
18 ;
19 else
20 foo();
21 }
22
23 /* { dg-final { scan-tree-dump-not "foo " "optimized" } } */