https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101072
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:053bcc97f4a59e3f2811b8a1edf60fd733a580a0 commit r12-6821-g053bcc97f4a59e3f2811b8a1edf60fd733a580a0 Author: Jason Merrill <ja...@redhat.com> Date: Thu Jan 20 05:45:02 2022 -0500 c++: constexpr and -fno-elide-constructors [PR101072] We've been trying for a while to avoid TARGET_EXPRs in template code, but there were still a few that snuck through, and the one in this case broke the code that tried to handle it. Fixed by using IMPLICIT_CONV_EXPR, as we have done elsewhere. I also noticed that finish_compound_literal was assuming that all T{init} were for aggregate T, and we got a few more TARGET_EXPRs from that. Fixed by only messing with TARGET_EXPR if we actually have an aggregate init. PR c++/101072 gcc/cp/ChangeLog: * cp-tree.h (build_implicit_conv_flags): Declare. * call.cc (build_implicit_conv_flags): Split out from... (perform_implicit_conversion_flags): ...here. * decl.cc (check_initializer): Use it. * pt.cc (tsubst_copy_and_build): Remove TARGET_EXPR handling. * semantics.cc (finish_compound_literal): Don't treat scalar values like CONSTRUCTORs. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-empty14a.C: New test.