blob: 8833eeec87050bc6d062e7362b77c1e30541192a (
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
|
/* PR tree-optimization/119614 */
/* { dg-do compile { target musttail } } */
/* { dg-options "-O2" } */
volatile int v;
[[gnu::noinline]] const char *
foo (int x)
{
v += x;
return (const char *) -42;
}
const char *
bar (int x)
{
if (x == 42)
[[gnu::musttail]] return foo (42);
[[gnu::musttail]] return foo (32);
}
const char *
baz (int x)
{
if (x == 5)
return foo (42);
return foo (32);
}
|