c++: throw and private destructor [PR109172]
authorJason Merrill <jason@redhat.com>
Fri, 17 Mar 2023 19:27:10 +0000 (15:27 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 17 Mar 2023 21:31:36 +0000 (17:31 -0400)
commit890043314a7f405081990ea9d0cb577dd44f883f
tree45a0f31590b7a4c253bdbe4a5501a85368965265
parentc48be8298c27143c1a684c0cb9689c88d16f4b49
c++: throw and private destructor [PR109172]

Since we aren't going through the normal call machinery, we need to check
the dtor access specifically.

PR c++/109172

gcc/cp/ChangeLog:

* except.cc (build_throw): Check dtor access.

gcc/testsuite/ChangeLog:

* g++.dg/eh/dtor4.C: New test.
gcc/cp/except.cc
gcc/testsuite/g++.dg/eh/dtor4.C [new file with mode: 0644]