diff options
author | Jason Merrill <jason@redhat.com> | 2022-01-04 15:25:07 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-01-06 19:23:17 -0500 |
commit | 40140b734487cbe03cd897dca47120317f898004 (patch) | |
tree | 4741f377c87c1dc20ef077a7cc3c27da9610af21 /gcc/cp/parser.c | |
parent | 4f6bc28fc7dd86bd9e7408cbf28de1e973dd1eda (diff) | |
download | gcc-40140b734487cbe03cd897dca47120317f898004.zip gcc-40140b734487cbe03cd897dca47120317f898004.tar.gz gcc-40140b734487cbe03cd897dca47120317f898004.tar.bz2 |
c++: don't cleanup the last aggregate elt
Now that we're building cleanups for aggregate elements more often, it seems
worth optimizing by avoiding building one for the last element; once it is
initialized, the complete object is fully initialized, the element cleanups
end in favor of the complete object cleanup, and so a cleanup for the last
element would guard nothing at all.
gcc/cp/ChangeLog:
* typeck2.c (split_nonconstant_init_1): Don't cleanup the last elt.
(split_nonconstant_init): Adjust.
gcc/testsuite/ChangeLog:
* g++.dg/tree-ssa/aggregate1.C: New test.
Diffstat (limited to 'gcc/cp/parser.c')
0 files changed, 0 insertions, 0 deletions