https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125391
--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Mikael Morin from comment #11) > (In reply to Mikael Morin from comment #8) > > > > The first two are those diagnosed in comment #5 (pre and post block dropped, > > and finalizer called in the wrong place/context). Paul's patch in comment > > #6 prevents them from appearing, but I think they remain latent. > > > The pre and post block dropped would be automatically fixed if the double > evaluation is fixed. I will try to produce an example for the misplaced > finalizer call generation. One of my intermediate attempts at a fix attached the final_expr to se.pre and then finished se.pre and assigned to final_expr it at trans.cc:1590. This put the code in the right order but the declaration of the temporary remained in the wrong place, of course. I tried changing its DECL_CONTEXT to that of the procedure but this had absolutely now effect. I'll push the patch tomorrow. Regards Paul
