diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/pr119616.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/pr119616.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr119616.c b/gcc/testsuite/c-c++-common/pr119616.c new file mode 100644 index 0000000..5ffdb8c --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr119616.c @@ -0,0 +1,23 @@ +/* PR tree-optimization/119616 */ +/* { dg-do compile { target external_musttail } } */ +/* { dg-options "-O2" } */ + +int foo (int *); +int bar (int); + +int +baz (int x) +{ + if (!x) + [[gnu::musttail]] return bar (x); + return foo (&x); +} + +int +qux (int x) +{ + if (!x) + [[gnu::musttail]] return bar (x); + foo (&x); + return 1; +} |