https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86485
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- For the is_really_empty_class assignments, usually the logic in cp_gimplify_expr to handle simple_empty_class_p cases (or it is already optimized away earlier). But for the COND_EXPR, the gimplifier creates iftmp.N var and adds 2 MODIFY_EXPRs to that and somehow in this case it doesn't trigger because the second argument to simple_empty_class_p is a TARGET_EXPR, not a gimple lvalue etc. Wonder if cp_gimplify_expr couldn't specially gimplify some COND_EXPRs with is_really_empty_class type by effectively turning it into a VOID_TYPE COND_EXPR and then just return as result of the whole an uninitialized temporary.