Debian Codegraph @

gcc/testsuite/g++.dg/opt/musttail2.C

raw
1 // PR ipa/119376
2 // { dg-do compile { target musttail } }
3 // { dg-options "-O2 -fno-early-inlining -fdump-tree-optimized" }
4 // { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } }
5
6 struct S { S () {} };
7
8 [[gnu::noipa]] char *
9 foo (S)
10 {
11 return 0;
12 }
13
14 char *
15 bar (S)
16 {
17 S t;
18 [[clang::musttail]] return foo (t);
19 }