summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error6.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error6.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error6.C20
1 files changed, 20 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 000000000..21180d765
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error6.C
@@ -0,0 +1,20 @@
+// { 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.
+// Update: Better to make it supported, I think...
+
+template <int N>
+struct A {};
+
+struct B
+{
+ static int foo(void);
+};
+
+template <class T>
+A<sizeof(T::foo())> func(void);
+
+int main()
+{
+ func<B>();
+}