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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The above patch is on top of the PR107637 patch (just to avoid patch
conflicts).
Anyway, on #c2 previously the IL had a CLEANUP_POINT_EXPR around the e
reference initializer as well as the A temporary created for extended init
refs, followed by CLEANUP_STMT (non-eh_only) which invokes ~A (); and further
statements go into the CLEANUP_STMT body (which contains the 4 get calls.
Now, if the get calls couldn't throw, we could just arrange for the get calls
to be done before the CLEANUP_STMT, inside of a CLEANUP_POINT_EXPR containing
the DECL_EXPRs and temporary initialization and the get calls.
But I think they can throw, and in that case we'd need to destroy the A
temporary.
So CLEANUP_POINT_EXPR with the non-CLEANUP_STMT stuff in it, plus eh_only
CLEANUP_STMTs with the get calls in it, followed by a copy of the CLEANUP_STMTs
non-eh_only?

Reply via email to