Debian Codegraph @

gcc/testsuite/c-c++-common/pr119614-2.c

raw
1 /* PR tree-optimization/119614 */
2 /* { dg-do compile { target musttail } } */
3 /* { dg-options "-O2" } */
4
5 volatile int v;
6
7 [[gnu::noinline]] const char *
8 foo (int x)
9 {
10 v += x;
11 return (const char *) -42;
12 }
13
14 const char *
15 bar (int x)
16 {
17 if (x == 42)
18 [[gnu::musttail]] return foo (42);
19 [[gnu::musttail]] return foo (32);
20 }
21
22 const char *
23 baz (int x)
24 {
25 if (x == 5)
26 return foo (42);
27 return foo (32);
28 }