gcc/testsuite/c-c++-common/pr119483-2.c
raw| 1 | /* PR tree-optimization/119483 */ |
| 2 | /* { dg-do compile { target musttail } } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | |
| 5 | [[noreturn]] int |
| 6 | foo (int x) |
| 7 | { |
| 8 | if (x > 10) |
| 9 | [[gnu::musttail]] return foo (x - 1); /* { dg-warning "function declared 'noreturn' has a 'return' statement" } */ |
| 10 | for (;;) |
| 11 | ; |
| 12 | } |