[Bug c++/83204] [6/7/8 Regression] c++ -std=c++14 ICE in maybe_undo_parenthesized_ref, at cp/semantics.c:1694
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 30 13:35:00 GMT 2017
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?
More information about the Gcc-bugs
mailing list