gcc/testsuite/g++.dg/musttail9.C
raw| 1 | /* { dg-do compile { target { musttail } } } */ |
| 2 | /* { dg-options "-std=gnu++11" } */ |
| 3 | /* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */ |
| 4 | |
| 5 | extern void foo(); |
| 6 | |
| 7 | void f() noexcept |
| 8 | { |
| 9 | [[gnu::musttail]] return foo(); /* { dg-error "call may throw exception that does not propagate" } */ |
| 10 | } |