https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109172
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:890043314a7f405081990ea9d0cb577dd44f883f commit r13-6742-g890043314a7f405081990ea9d0cb577dd44f883f Author: Jason Merrill <ja...@redhat.com> Date: Fri Mar 17 15:27:10 2023 -0400 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.