https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101030
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:511e8b612287ad828c60f2f12c500ccfa26c275c commit r11-9751-g511e8b612287ad828c60f2f12c500ccfa26c275c Author: Marek Polacek <pola...@redhat.com> Date: Tue Mar 29 14:36:55 2022 -0400 c-family: ICE with -Wconversion and A ?: B [PR101030] This patch fixes a crash in conversion_warning on a null expression. It is null because the testcase uses the GNU A ?: B extension. We could also use op0 instead of op1 in this case, but it doesn't seem to be necessary. PR c++/101030 gcc/c-family/ChangeLog: * c-warn.c (conversion_warning) <case COND_EXPR>: Don't call conversion_warning when OP1 is null. gcc/testsuite/ChangeLog: * g++.dg/ext/cond5.C: New test. (cherry picked from commit 5db9ce171019f8915885cebd5cc5f4101bb926e6)