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

--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Aug 15 21:55:19 2019
New Revision: 274550

URL: https://gcc.gnu.org/viewcvs?rev=274550&root=gcc&view=rev
Log:
        PR c++/90393 - ICE with thow in ?:

My previous patch for 64372 was incomplete: it only stopped making the
non-throw argument into an rvalue, lvalue_kind still considered the ?:
expression to be an rvalue, leaving us worse than before.

        PR c++/64372, DR 1560 - Gratuitous lvalue-to-rvalue conversion in ?:
        * tree.c (lvalue_kind): Handle throw in one arm.
        * typeck.c (rationalize_conditional_expr): Likewise.
        (cp_build_modify_expr): Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/expr/cond15.C
    trunk/gcc/testsuite/g++.dg/expr/cond16.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/g++.dg/abi/mangle53.C
    trunk/gcc/testsuite/g++.old-deja/g++.eh/cond1.C
    trunk/gcc/testsuite/g++.old-deja/g++.other/cond5.C

Reply via email to