aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/array.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-01-17 17:08:03 -0500
committerJason Merrill <jason@redhat.com>2022-01-18 12:42:52 -0500
commit7ca21601704c4a637f3cefa7c8814920782354d8 (patch)
treee866f6c23c684d0dae7530f5a88f70929ca89b25 /gcc/fortran/array.cc
parent3a0837b8fb96f50f2e60222ce289cc2542bbb477 (diff)
downloadgcc-7ca21601704c4a637f3cefa7c8814920782354d8.zip
gcc-7ca21601704c4a637f3cefa7c8814920782354d8.tar.gz
gcc-7ca21601704c4a637f3cefa7c8814920782354d8.tar.bz2
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.
Diffstat (limited to 'gcc/fortran/array.cc')
0 files changed, 0 insertions, 0 deletions