blob: 2a92bcbdfa7dfb630412061efd7c20c3e80e6dde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* PR ipa/119376 */
/* { dg-do compile { target musttail } } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\]" 4 "optimized" } } */
int foo (int);
int
bar (int x)
{
[[gnu::musttail]] return foo (x + 1);
}
int
baz (int x)
{
return foo (x + 1);
}
int
qux (int x)
{
return foo (x + 2);
}
int
corge (int x)
{
[[gnu::musttail]] return foo (x + 2);
}
|