https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83204
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-11-30 CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Started with r236616. I think this is related to maybe_undo_parenthesized_ref relying on REF_PARENTHESIZED_P operands being in a certain form, which is what force_paren_expr creates. But in pt.c we have: tree r = RECUR (TREE_OPERAND (t, 0)); if (REFERENCE_REF_P (t)) { /* A type conversion to reference type will be enclosed in such an indirect ref, but the substitution of the cast will have also added such an indirect ref. */ r = convert_from_reference (r); } else r = build_x_indirect_ref (input_location, r, RO_UNARY_STAR, complain|decltype_flag); if (TREE_CODE (r) == INDIRECT_REF) REF_PARENTHESIZED_P (r) = REF_PARENTHESIZED_P (t); where we copy over the bit, even when the tsubsted operand might be completely different. So should maybe_undo_parenthesized_ref be able to cope with any other form (and how), or should we not set REF_PARENTHESIZED_P if the form of r's operands no longer matches, something else?