From: Jason Merrill Date: Sat, 11 Oct 2014 02:26:33 +0000 (-0400) Subject: re PR c++/63194 (ICE in maybe_explain_implicit_delete, at cp/method.c:1552) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51115027530f64fe29b5c755a161581658a32c38;p=gcc.git re PR c++/63194 (ICE in maybe_explain_implicit_delete, at cp/method.c:1552) PR c++/63194 * method.c (defaulted_late_check): Call maybe_instantiate_noexcept. From-SVN: r216114 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3e2ab6ece42..acdb354816c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-10-10 Jason Merrill + PR c++/63194 + * method.c (defaulted_late_check): Call maybe_instantiate_noexcept. + * method.c (implicitly_declare_fn): Handle deleted lambda default ctor and copy assop here. * class.c (check_bases_and_members): Not here. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index dce2d2b2caf..418ed8874d0 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1979,6 +1979,7 @@ defaulted_late_check (tree fn) is explicitly defaulted on its first declaration, (...) it is implicitly considered to have the same exception-specification as if it had been implicitly declared. */ + maybe_instantiate_noexcept (fn); tree fn_spec = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (fn)); if (!fn_spec) { diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept25.C b/gcc/testsuite/g++.dg/cpp0x/noexcept25.C new file mode 100644 index 00000000000..e79b7863d72 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept25.C @@ -0,0 +1,12 @@ +// PR c++/63194 +// { dg-do compile { target c++11 } } + +template +class A { + public: + A() noexcept(noexcept(0)) = default; +}; +class B { + A<0> m_points; +}; +void fn1(A<0>, A<0>) { B(); }