diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/musttail24.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/musttail24.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/musttail24.c b/gcc/testsuite/c-c++-common/musttail24.c new file mode 100644 index 0000000..10c2d3f --- /dev/null +++ b/gcc/testsuite/c-c++-common/musttail24.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ + +#if !__has_attribute (musttail) +#error missing musttail attribute +#endif +#ifdef __cplusplus +#if !__has_cpp_attribute (gnu::musttail) +#error missing gnu::musttail attribute +#endif +#if !__has_cpp_attribute (clang::musttail) +#error missing clang::musttail attribute +#endif +#else +#if !__has_c_attribute (gnu::musttail) +#error missing gnu::musttail attribute +#endif +#if !__has_c_attribute (clang::musttail) +#error missing clang::musttail attribute +#endif +#endif |