gcc/testsuite/c-c++-common/musttail20.c
raw| 1 | /* { dg-do compile { target struct_musttail } } */ |
| 2 | /* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */ |
| 3 | |
| 4 | struct str |
| 5 | { |
| 6 | int a, b; |
| 7 | }; |
| 8 | struct str |
| 9 | cstruct (int x) |
| 10 | { |
| 11 | if (x < 10) |
| 12 | L: |
| 13 | __attribute__((musttail)) return cstruct (x + 1); /* { dg-warning "'musttail' attribute ignored" "" { target c } } */ |
| 14 | return ((struct str){ x, 0 }); |
| 15 | } |