re PR c++/81675 (attribute(noreturn) of destructor in :? not honored)
authorJakub Jelinek <jakub@gcc.gnu.org>
Mon, 27 Nov 2017 13:13:22 +0000 (14:13 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 27 Nov 2017 13:13:22 +0000 (14:13 +0100)
commitcb358080c908eedc600855bd689f5bd349f5ac98
treef6d8a5086d6acee3218bc636a68083d0ac0969c2
parent04f915037850166c05c73baf3d6e2ba10c790ea1
re PR c++/81675 (attribute(noreturn) of destructor in :? not honored)

PR c++/81675
* cp-gimplify.c (cp_fold) <case COND_EXPR>: Don't return immediately
for VOID_TYPE_P COND_EXPRs, instead fold the operands and if op0 is
INTEGER_CST, ensure that both op1 and op2 are non-NULL and fall
through into normal folding, otherwise just rebuild x if any op
changed.

* g++.dg/warn/pr81675.C: New test.

From-SVN: r255167
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/pr81675.C [new file with mode: 0644]