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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:b0605cd4a12e9162cc56abc69ca1048947c72689

commit r12-10110-gb0605cd4a12e9162cc56abc69ca1048947c72689
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Dec 20 11:06:27 2023 -0500

    c++: throwing dtor and empty try [PR113088]

    maybe_splice_retval_cleanup assumed that the function body can't be empty
if
    there's a throwing cleanup, but when I added cleanups to try blocks in
    r12-6333-gb10e031458d541 I didn't adjust that assumption.

            PR c++/113088
            PR c++/33799

    gcc/cp/ChangeLog:

            * except.cc (maybe_splice_retval_cleanup): Handle an empty block.

    gcc/testsuite/ChangeLog:

            * g++.dg/eh/return2.C: New test.

    (cherry picked from commit 02c0b49798228d777610f898cd9d63ebec43656d)

Reply via email to