diff options
author | Jason Merrill <jason@redhat.com> | 2022-01-01 13:07:59 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-01-02 12:56:02 -0500 |
commit | c743614e7016c5b2e5c5871cba23de68134d4950 (patch) | |
tree | 8d82978674919f385b5f34f00cc3b7b2a732342f /libphobos/src/std/algorithm/setops.d | |
parent | 092e60f57adeccf98e876af6b7b5734337904812 (diff) | |
download | gcc-c743614e7016c5b2e5c5871cba23de68134d4950.zip gcc-c743614e7016c5b2e5c5871cba23de68134d4950.tar.gz gcc-c743614e7016c5b2e5c5871cba23de68134d4950.tar.bz2 |
c++: fix array cleanup with throwing temp dtor
While working on PR66139 I noticed that if the destructor of a temporary
created during array initialization throws, we were failing to destroy the
last array element constructed. Throwing destructors are rare since C++11,
but this should be fixed.
gcc/cp/ChangeLog:
* init.c (build_vec_init): Append the decrement to elt_init.
gcc/testsuite/ChangeLog:
* g++.dg/eh/array2.C: New test.
Diffstat (limited to 'libphobos/src/std/algorithm/setops.d')
0 files changed, 0 insertions, 0 deletions