https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:d54a86cd92860e1108f43fae9329ccb0897f3e1d

commit r10-6212-gd54a86cd92860e1108f43fae9329ccb0897f3e1d
Author: Marek Polacek <pola...@redhat.com>
Date:   Fri Jan 17 15:17:42 2020 -0500

    c++: Fix ICE in tsubst_copy with parenthesized expression [PR93299]

    Since e4511ca2e9ecdb51d41b64452398f8e2df575668 force_paren_expr can create
    a VIEW_CONVERT_EXPR so that we have something to set REF_PARENTHESIZED_P
    on, while not making the expression dependent.  But tsubst_copy can't cope
    with such a VIEW_CONVERT_EXPR, because it's not location_wrapper_p, or
    a TEMPLATE_PARM_INDEX wrapped in a VIEW_CONVERT_EXPR.

    I think we need to teach tsubst_copy how to handle it.  Setting
    EXPR_LOCATION_WRAPPER_P in force_paren_expr would make the ICE go away
    too, but tsubst_copy would lose the REF_PARENTHESIZED_P flag.

    2020-01-24  Marek Polacek  <pola...@redhat.com>

        PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
        * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.

        * g++.dg/cpp1y/paren5.C: New test.

Reply via email to