Debian Codegraph @

gcc/testsuite/c-c++-common/pr119484.c

raw
1 /* PR ipa/119484 */
2 /* { dg-do compile { target musttail } } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "bar\[.a-z0-9]* \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
5
6 void foo (int);
7
8 [[gnu::noinline]] static int
9 bar (int x)
10 {
11 foo (x);
12 return 0;
13 }
14
15 int
16 baz (int x)
17 {
18 if (x == 1)
19 [[gnu::musttail]] return bar (x);
20 return 0;
21 }