c++: Partially revert patch for PR66139.
authorJason Merrill <jason@redhat.com>
Tue, 10 Mar 2020 20:05:18 +0000 (16:05 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 10 Mar 2020 20:30:56 +0000 (16:30 -0400)
commit14af5d9b19b0f4ee1d929e505e245ae5c2f6bdc6
treebab7ae0a1629bb7174dcab14477047e93da64e87
parente00cb200f39d8144de226e76c5d0257b613dbbf6
c++: Partially revert patch for PR66139.

The patch for 66139 exposed a long-standing bug with
split_nonconstant_init (since 4.7, apparently): initializion of individual
elements of an aggregate are not a full-expressions, but
split_nonconstant_init was making full-expressions out of them.  My fix for
66139 extended the use of split_nonconstant_init, and thus the bug, to
aggregate initialization of temporaries within an expression, in which
context (PR94041) the bug is more noticeable.  PR93922 is a problem with my
implementation strategy of splitting out at gimplification time, introducing
function calls that weren't in the GENERIC.  So I'm going to revert the
patch now and try again for GCC 11.

gcc/cp/ChangeLog
2020-03-10  Jason Merrill  <jason@redhat.com>

PR c++/93922
PR c++/94041
PR c++/52320
PR c++/66139
* cp-gimplify.c (cp_gimplify_init_expr): Partially revert patch for
66139: Don't split_nonconstant_init.  Remove pre_p parameter.
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/g++.dg/cpp0x/initlist116.C [deleted file]
gcc/testsuite/g++.dg/cpp0x/initlist117.C [deleted file]
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C [deleted file]
gcc/testsuite/g++.dg/eh/aggregate1.C [deleted file]