aboutsummaryrefslogtreecommitdiff
path: root/gcc/file-prefix-map.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-03-06 22:57:57 -0500
committerJason Merrill <jason@redhat.com>2023-03-09 16:26:43 -0500
commite0324e2629e25a90c13c68b4eef1e47b091970c3 (patch)
tree54d7347b1474a45b8c8a2278981c64b21feb9bec /gcc/file-prefix-map.h
parent4214bdb1d77ebee04d12f66c831730ed67fedf55 (diff)
downloadgcc-e0324e2629e25a90c13c68b4eef1e47b091970c3.zip
gcc-e0324e2629e25a90c13c68b4eef1e47b091970c3.tar.gz
gcc-e0324e2629e25a90c13c68b4eef1e47b091970c3.tar.bz2
c++: allocator temps in list of arrays [PR108773]
The optimization to reuse the same allocator temporary for all string constructor calls was breaking on this testcase, because the temps were already in the argument to build_vec_init, and replacing them with references to one slot got confused with calls at multiple levels (for the initializer_list backing array, and then again for the array member of the std::array). Fixed by reusing the whole TARGET_EXPR instead of pulling out the slot; gimplification ensures that it's only initialized once. I also moved the check for initializing a std:: class down into the tree walk, and handle multiple temps within a single array element initialization. PR c++/108773 gcc/cp/ChangeLog: * init.cc (find_allocator_temps_r): New. (combine_allocator_temps): Replace find_allocator_temp. (build_vec_init): Adjust. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-array18.C: New test. * g++.dg/cpp0x/initlist-array19.C: New test.
Diffstat (limited to 'gcc/file-prefix-map.h')
0 files changed, 0 insertions, 0 deletions