Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / tailcall-2.c
blobbd9a853546103b5b976fd699cc80ab01f423b901
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-tailc-details" } */
3 /* Test provided by Richard Earnshaw in PR 14312. */
5 void bar (int i);
6 void baz (int *);
8 void
9 foo (int *x)
11 if (*x < 0)
13 baz (x);
14 return;
16 bar (*x);
19 /* The test has no local call-clobbered variables. Only the memory
20 tag for 'x' is call-clobbered. And since tags are not real
21 variables, they ought to be ignored. There should be two tail
22 calls here. */
23 /* { dg-final { scan-tree-dump-times "Found tail call" 2 "tailc"} } */
24 /* { dg-final { cleanup-tree-dump "tailc" } } */