https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119119
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:81ebacc70c3446218a347902362cc032fc615f6c commit r12-11228-g81ebacc70c3446218a347902362cc032fc615f6c Author: Richard Biener <rguent...@suse.de> Date: Thu Mar 6 09:08:07 2025 +0100 middle-end/119119 - re-gimplification of empty CTOR assignments The following testcase runs into a re-gimplification issue during inlining when processing MEM[(struct e *)this_2(D)].a = {}; where re-gimplification does not handle assignments in the same way than the gimplifier but instead relies on rhs_predicate_for and gimplifying the RHS standalone. This fails to handle special-casing of CTORs. The is_gimple_mem_rhs_or_call predicate already handles clobbers but not empty CTORs so we end up in the fallback code trying to force the CTOR into a separate stmt using a temporary - but as we have a non-copyable type here that ICEs. The following generalizes empty CTORs in is_gimple_mem_rhs_or_call since those need no additional re-gimplification. PR middle-end/119119 * gimplify.cc (is_gimple_mem_rhs_or_call): All empty CTORs are OK when not a register type. * g++.dg/torture/pr11911.C: New testcase. (cherry picked from commit 3bd61c1dfaa2d7153eb4be82f423533ea937d0f9)