https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79937
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- --- gcc/cp/tree.c.jj 2018-01-11 18:58:48.348391787 +0100 +++ gcc/cp/tree.c 2018-01-16 17:15:52.510371663 +0100 @@ -3101,7 +3101,12 @@ replace_placeholders_r (tree* t, int* wa for (; !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (*t), TREE_TYPE (x)); x = TREE_OPERAND (x, 0)) - gcc_assert (TREE_CODE (x) == COMPONENT_REF); + if (TREE_CODE (x) != COMPONENT_REF) + { + /* PLACEHOLDER_EXPR for some other object. */ + *walk_subtrees = false; + break; + } *t = x; *walk_subtrees = false; d->seen = true; avoids the ICE, but whether it is correct or not I have no idea. So, not really working on this.