https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95768
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Component|tree-optimization |c++ --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- This is the same case of the pretty printer not handling an expression as pr95580, except this one is in the C++ front end (the code is duplicated almost verbatim between the two). tree-ssa-uninit.c calls: if (warning_at (location, OPT_Wuninitialized, "%G%qE is used uninitialized", stmt, rhs)) with this STMT and its RHS: b$4$g_7 = MEM <int> [(const struct m &)_6 + 4]; expr_to_string() in cp/error.c then does this with the RHS: case MEM_REF: if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR && integer_zerop (TREE_OPERAND (t, 1))) dump_expr (pp, TREE_OPERAND (TREE_OPERAND (t, 0), 0), flags); else { pp_cxx_star (pp); if (!integer_zerop (TREE_OPERAND (t, 1))) { pp_cxx_left_paren (pp); if (!integer_onep (TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)))))) but because the MEM_REF first operand is not a ADDR_EXPR the else branch trips the ICE in integer_zerop() because because the RHS type is void* whose TYPE_SIZE_UNIT is null that integer_zerop() is not prepared to handle.