[patch c++]: Fix PR/64100 'A static assert using the the current class in a noexcept test leads to a segfault'
Kai Tietz
ktietz70@googlemail.com
Thu Dec 4 21:50:00 GMT 2014
Ok, Additional change for testcase mentioned in PR.
ChangeLog
2014-12-04 Kai Tietz <ktietz@redhat.com>
PR c++/641000
* g++.dg/template/pr64100.C: New file.
Ok for apply?
Regards,
Kai
Index: gcc/gcc/testsuite/g++.dg/template/pr64100.C
===================================================================
--- /dev/null
+++ gcc/gcc/testsuite/g++.dg/template/pr64100.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++11 } }
+
+template<typename> struct foo // { dg-message "note" }
+{ // { dg-error "incomplete type" }
+ static_assert(noexcept(((foo *)1)->~foo()), "");
+};
+
+template class foo<int>;
+
More information about the Gcc-patches
mailing list