]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
error6.C: New test.
authorGiovanni Bajo <giovannibajo@libero.it>
Mon, 30 Jun 2003 19:01:08 +0000 (21:01 +0200)
committerWolfgang Bangerth <bangerth@gcc.gnu.org>
Mon, 30 Jun 2003 19:01:08 +0000 (13:01 -0600)
2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>

        * g++.dg/other/error6.C: New test.

From-SVN: r68723

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error6.C [new file with mode: 0644]

index 5163f6278cd69de455de73f890ba22d8de96f1fd..ae6c4171bed71110cd4e5b57efd00a90eb4319a5 100644 (file)
@@ -1,4 +1,8 @@
-2003-06-17  Giovanni Bajo  <giovannibajo@libero.it>
+2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
+
+        * g++.dg/other/error6.C: New test.
+
+2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
 
         PR c++/10750
         * g++.dg/parse/constant2.C: New test.
diff --git a/gcc/testsuite/g++.dg/other/error6.C b/gcc/testsuite/g++.dg/other/error6.C
new file mode 100644 (file)
index 0000000..9b403c7
--- /dev/null
@@ -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" }
+}