aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr119618.c
blob: a56e6695cf5afa2e338cbaac616d6fb12d46850b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR gcov-profile/119618 */
/* { dg-do compile { target musttail } } */
/* { dg-options "-fcompare-debug -fprofile-generate -O1" } */
/* { dg-require-profiling "-fprofile-generate" } */

struct S { char s; };
int foo (void);
int *(*fn) (void);

int *
bar (void)
{
  if (foo ())
    return 0;
  {
    struct S s;
    do
      [[gnu::musttail]] return fn ();
    while (0);
  }
}