[Bug c++/125771] [13/14/15/16/17 Regression] Double destructor call during aggregate initialization with designated initializers when an exception is thrown.

zheng.xianyuwang at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 18 22:25:37 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125771

--- Comment #4 from Wang Jinghao <zheng.xianyuwang at gmail dot com> ---
Comment on attachment 64784
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64784
gcc-17

I have a simple patch that fixes this case by disabling the subobject cleanups
introduced at each recursion level whenever initialization at that level cannot
be fully emitted as statements.


More information about the Gcc-bugs mailing list