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