aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr119483-2.c
blob: e7b692dc80bdac18716f0de844a52f480c511684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* PR tree-optimization/119483 */
/* { dg-do compile { target musttail } } */
/* { dg-options "-O2" } */

[[noreturn]] int
foo (int x)
{
  if (x > 10)
    [[gnu::musttail]] return foo (x - 1);	/* { dg-warning "function declared 'noreturn' has a 'return' statement" } */
  for (;;)
    ;
}