-
- Downloads
c++: new (nothrow) array cleanup [PR104007]
For this testcase, the cleanup that is supposed to happen if initialization throws was wrongly being run on the normal control path as well. This turns out to be because the EH-only handling in gimple_push_cleanup didn't apply to conditional cleanups such as we have for nothrow new, since we check whether the result is non-null before proceeding with the initialization. PR c++/104007 gcc/ChangeLog: * gimplify.cc (gimple_push_cleanup): Handle eh_only in conditional context. gcc/testsuite/ChangeLog: * g++.dg/eh/new2.C: New test.
Loading
Please register or sign in to comment