https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81675
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 15 22:06:16 2017 New Revision: 255718 URL: https://gcc.gnu.org/viewcvs?rev=255718&root=gcc&view=rev Log: Backported from mainline 2017-11-27 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/warn/pr81675.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-gimplify.c branches/gcc-7-branch/gcc/testsuite/ChangeLog