]> gcc.gnu.org Git - gcc.git/commit
Fix PR 101230: ICE in fold_cond_expr_with_comparison
authorAndrew Pinski <apinski@marvell.com>
Sun, 27 Jun 2021 20:14:48 +0000 (13:14 -0700)
committerAndrew Pinski <apinski@marvell.com>
Sun, 27 Jun 2021 23:14:29 +0000 (16:14 -0700)
commit37ad257c06d88fdb810be336d212c1ab54b99dad
tree6258d2870778902595f9fca7b943dbb082181443
parent3966726333b2a4cf54333549c8331d833364266e
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.
gcc/fold-const.c
gcc/testsuite/gcc.dg/torture/pr101230-1.c [new file with mode: 0644]
This page took 0.076563 seconds and 6 git commands to generate.