PR c++/81675
commit3c382e05c2c9800aa4ce3bf68a30383cc8c0d6b8
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Nov 2017 13:13:22 +0000 (27 13:13 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Nov 2017 13:13:22 +0000 (27 13:13 +0000)
treef6d8a5086d6acee3218bc636a68083d0ac0969c2
parenta606052c9810d8a55fdee40fd8ca1819c2d19146
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255167 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/pr81675.C [new file with mode: 0644]