Debian Codegraph @

gcc/testsuite/g++.dg/lto/pr119614_0.C

raw
1 // PR tree-optimization/119614
2 // { dg-lto-do link }
3 // { dg-lto-options { { -O2 -fPIC -flto -flto-partition=max } } }
4 // { dg-require-effective-target shared }
5 // { dg-require-effective-target fpic }
6 // { dg-require-effective-target musttail }
7 // { dg-extra-ld-options "-shared" }
8
9 struct S {} b;
10 char *foo ();
11 int e, g;
12 void bar ();
13 void corge (S);
14
15 [[gnu::noinline]] static char *
16 baz ()
17 {
18 bar ();
19 return 0;
20 }
21
22 const char *
23 qux ()
24 {
25 if (e)
26 {
27 S a = b;
28 corge (a);
29 if (g)
30 return 0;
31 [[gnu::musttail]] return baz ();
32 }
33 return foo ();
34 }