[Bug c++/103711] Virtual base destroyed twice when an exception is thrown in a derived class' constructor called from a delegated constructor
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 28 04:38:50 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103711
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:2aa4400cb9830da0a335a8cbb75183706714b28d
commit r11-9520-g2aa4400cb9830da0a335a8cbb75183706714b28d
Author: Jason Merrill <jason@redhat.com>
Date: Wed Jan 5 19:39:48 2022 -0500
c++: when delegating constructor throws [PR103711]
We were always calling the complete destructor if the target constructor
throws, even if we were calling the base constructor.
PR c++/103711
gcc/cp/ChangeLog:
* init.c (perform_target_ctor): Select destructor by in_chrg.
gcc/testsuite/ChangeLog:
* g++.dg/eh/delegating1.C: New test.
More information about the Gcc-bugs
mailing list