Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/tailcall-9.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-tailc-details" } */
3
4 __attribute__((noinline))
5 static float f(float x)
6 {
7 return x*x;
8 }
9
10 static double g(float x)
11 {
12 return x>0 ? f(x) : x+1.0;
13 }
14
15 float foo(float x)
16 {
17 return g(x);
18 }
19
20 /* { dg-final { scan-tree-dump "Found tail call" "tailc" } } */