aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/d-lang.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-04-03 16:17:29 -0400
committerJason Merrill <jason@redhat.com>2021-04-03 20:59:00 -0400
commitc3d3bb0f03dbd02512ab46979088ee8e22520c24 (patch)
tree3bc8b2dde7623eb9a72549c7df92c2fd27f51044 /gcc/d/d-lang.cc
parentc0756c4eb36b6bf4bf1ea0cf3633f08ae0e1c13d (diff)
downloadgcc-c3d3bb0f03dbd02512ab46979088ee8e22520c24.zip
gcc-c3d3bb0f03dbd02512ab46979088ee8e22520c24.tar.gz
gcc-c3d3bb0f03dbd02512ab46979088ee8e22520c24.tar.bz2
c++: array new initialized from a call [PR99643]
Here the get_foo() call results in a TARGET_EXPR, which we strip in massage_init_elt, but then when build_vec_init tries to use it to initialize the array element we crash because build_aggr_init expects a class rvalue to have a TARGET_EXPR. So don't strip it. The stripping was added in r206639 for PR59659, so I checked that removing it didn't significantly increase compile time or memory usage for that testcase; compile time was unaffected, memory usage increased by 0.00004%. gcc/cp/ChangeLog: PR c++/99643 * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR. gcc/testsuite/ChangeLog: PR c++/99643 * g++.dg/cpp0x/initlist-new5.C: New test.
Diffstat (limited to 'gcc/d/d-lang.cc')
0 files changed, 0 insertions, 0 deletions