PR c++/90393 - ICE with thow in ?:
authorJason Merrill <jason@redhat.com>
Thu, 15 Aug 2019 21:55:19 +0000 (17:55 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 15 Aug 2019 21:55:19 +0000 (17:55 -0400)
commit7148dede8a84e17cc0b00190d76fabbc1a717654
treef160ffecb6dcfc5746b9c4a402681d65b1e664fd
parentd321551cea11f27a9afd67ece9bbda095a579950
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.

From-SVN: r274550
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/g++.dg/abi/mangle53.C
gcc/testsuite/g++.dg/expr/cond15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/expr/cond16.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.eh/cond1.C
gcc/testsuite/g++.old-deja/g++.other/cond5.C