]> gcc.gnu.org Git - gcc.git/commit
c++: Fix ICE with defaulted destructor and template.
authorJason Merrill <jason@redhat.com>
Thu, 23 Jan 2020 17:32:02 +0000 (12:32 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 23 Jan 2020 18:11:10 +0000 (13:11 -0500)
commit20afdcd36982752ba012960b862e9be7154b1274
treeb1b84dfb8fe2f82951a212efb5388a807bd245b7
parent648796dab42b6e839f10fee5835f24cd2016a9f4
c++: Fix ICE with defaulted destructor and template.

In a template we don't instantiate a deferred noexcept-spec, and we don't
need it because we aren't going to do anything with the value of
throwing_cleanup in a template anyway.

PR c++/93345 - ICE with defaulted dtor and template.
PR c++/33799
* decl.c (cxx_maybe_build_cleanup): Don't try to set
throwing_cleanup in a template.
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/g++.dg/cpp0x/initlist-cleanup1.C [new file with mode: 0644]
This page took 0.061044 seconds and 6 git commands to generate.