Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr108357.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 static char b;
5 static unsigned c;
6 void foo();
7 short(a)(short d, short e) { return d * e; }
8 static short f(short d) {
9 b = 0;
10 if ((d && 0 >= c < d) ^ d)
11 ;
12 else
13 foo();
14 return d;
15 }
16 int main()
17 {
18 short g = a(5, b ^ 9854);
19 f(g);
20 }
21
22 /* We expect threadfull1 to eliminate the call to foo(), but not all targets
23 manage that at that point. Calling conventions (mandatory promotion) play a
24 role, but there's more than that. */
25 /* { dg-final { scan-tree-dump-not "foo" "optimized" } } */