Attached is a patch for PR127281. I added testing to an existing test in order to explore more adjacent corners and capture a runtime failure that was hiding behind the ICE. When there were two effective blocks in a function the compiler ICEd because of two conflicting declarations for the return value cleanup sentinel. With no intervening declaration, there were two destructors calls if an exception escaped the destruction of temporaries.
There's another followup bug (127414) that requires additional cleanup steps to be added to handle proper exceptions escaping from postcondition evaluations. Right now we leak or double destroy, this fix makes it all just leak, and the fix to 127414 looks like it will depend on this fix as well. I ran the full dg test suite (check=g++ and check-gcc) before and aftetr, no new tests failed and 3 new tests passed (the runtime testing that i added for the existing test).
0001-c-fix-return-object-cleanup-for-functions-with-contr.patch
Description: Binary data
