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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:5ed8c71b53a5ac93c68179770cb047227b587bcb

commit r9-8452-g5ed8c71b53a5ac93c68179770cb047227b587bcb
Author: Jason Merrill <ja...@redhat.com>
Date:   Sat Apr 4 11:04:55 2020 -0400

    c++: Fix reuse of class constants [PR94453]

    The testcase hit an ICE trying to expand a TARGET_EXPR temporary cached
from
    the other lambda-expression.  This patch fixes this in two ways:

    1) Avoid reusing a TARGET_EXPR from another function.
    2) Avoid ending up with a TARGET_EXPR at all; the use of 'p' had become
    <TARGET_EXPR<NON_LVALUE_EXPR<TARGET_EXPR ...>>>, which doesn't make any
    sense.

    gcc/cp/ChangeLog
    2020-04-04  Jason Merrill  <ja...@redhat.com>

            PR c++/94453
            * constexpr.c (maybe_constant_value): Use break_out_target_exprs.
            * expr.c (mark_use) [VIEW_CONVERT_EXPR]: Don't wrap a TARGET_EXPR
in
            NON_LVALUE_EXPR.

Reply via email to