Skip to content
Snippets Groups Projects
Commit 37ad257c authored by Andrew Pinski's avatar Andrew Pinski
Browse files

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.
parent 39667263
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment