re PR c++/61019 (ICE: incomplete type of class template as pseudo-destructor-name)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 22 Sep 2016 17:11:33 +0000 (17:11 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 22 Sep 2016 17:11:33 +0000 (17:11 +0000)
2016-09-22  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/61019
* g++.dg/cpp0x/pr61019.C: New.

From-SVN: r240380

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

index 37e220d..da6be3c 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/61019
+       * g++.dg/cpp0x/pr61019.C: New.
+
 2016-09-22  Andre Vieira  <andre.simoesdiasvieira@arm.com>
            Terry Guo  <terry.guo@arm.com>
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr61019.C b/gcc/testsuite/g++.dg/cpp0x/pr61019.C
new file mode 100644 (file)
index 0000000..e0d87f4
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/61019
+// { dg-do compile { target c++11 } }
+
+template<class>
+struct S
+{
+  static_assert(((S*)0)->~S(), "");  // { dg-error "incomplete type" }
+};
+
+S<int> b;