aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-04-10 13:19:42 -0600
committerJeff Law <law@gcc.gnu.org>2017-04-10 13:19:42 -0600
commit9058a2c5c5505f75e40f96f0a86d4e343d7c2743 (patch)
treed1ab4c2bf223dbce9c630a7c01b3744826ecacad /gcc/tree-ssa-dom.c
parentbd8f86429e63734550981cdc07a2908dc85b891b (diff)
downloadgcc-9058a2c5c5505f75e40f96f0a86d4e343d7c2743.zip
gcc-9058a2c5c5505f75e40f96f0a86d4e343d7c2743.tar.gz
gcc-9058a2c5c5505f75e40f96f0a86d4e343d7c2743.tar.bz2
re PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)
PR tree-optimization/80374 * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to record anything if we can not convert integer_zero_node to the desired type. PR tree-optimization/80374 * g++.dg/pr80374.c: New test. From-SVN: r246819
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index d2263bb..d9e5942 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -701,7 +701,8 @@ derive_equivalences_from_bit_ior (tree name,
const_and_copies *const_and_copies,
int recursion_limit)
{
- if (recursion_limit == 0)
+ if (recursion_limit == 0
+ || !fold_convertible_p (TREE_TYPE (name), integer_zero_node))
return;
if (TREE_CODE (name) == SSA_NAME)