https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101230
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:37ad257c06d88fdb810be336d212c1ab54b99dad commit r12-1832-g37ad257c06d88fdb810be336d212c1ab54b99dad Author: Andrew Pinski <apin...@marvell.com> Date: Sun Jun 27 13:14:48 2021 -0700 Fix PR 101230: ICE in fold_cond_expr_with_comparison This fixes PR 101230 where I had messed up and forgot that invert_tree_comparison can return ERROR_MARK if the comparsion is not invertable (floating point types). Committed as obvious after a bootstrap/test on x86_64-linux-gnu-gnu gcc/ChangeLog: PR middle-end/101230 * fold-const.c (fold_ternary_loc): Check the return value of invert_tree_comparison. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr101230-1.c: New test.