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