diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr119618.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/pr119618.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr119618.c b/gcc/testsuite/c-c++-common/pr119618.c new file mode 100644 index 0000000..a56e669 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr119618.c @@ -0,0 +1,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); + } +} |