Debian Codegraph @

gcc/testsuite/c-c++-common/pr119535.c

raw
1 /* PR gcov-profile/119535
2 /* { dg-do compile { target musttail } } */
3 /* { dg-options "-fprofile-generate -O2" } */
4 /* { dg-require-profiling "-fprofile-generate" } */
5
6 [[gnu::noipa]] int
7 foo (int x)
8 {
9 return 42 + x;
10 }
11
12 int
13 bar (int x)
14 {
15 foo (x);
16 foo (2);
17 [[clang::musttail]] return foo (3);
18 }
19
20 int
21 baz (int x)
22 {
23 if (x == 42)
24 return -1;
25 else if (x == 15)
26 return 25;
27 else if (x == 26)
28 [[clang::musttail]] return foo (4);
29 else
30 [[clang::musttail]] return foo (5);
31 }