diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error6.C')
-rw-r--r-- | gcc/testsuite/g++.dg/other/error6.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error6.C b/gcc/testsuite/g++.dg/other/error6.C new file mode 100644 index 00000000000..9b403c7207b --- /dev/null +++ b/gcc/testsuite/g++.dg/other/error6.C @@ -0,0 +1,19 @@ +// { dg-do compile } +// Make sure we emit a decent error message when trying to mangle an +// expression not supported by the C++ ABI due to a defect. + +template <int N> +struct A {}; + +struct B +{ + static int foo(void); +}; + +template <class T> +A<sizeof(T::foo())> func(void); + +int main() +{ + func<B>(); // { dg-error "sorry, unimplemented" } +} |