aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-03-13 11:32:11 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-03-13 11:32:11 +0000
commitcd5091f1eab0b6f19a1f0557bf40d1aa9ec34dd4 (patch)
tree6fbb67876b941ff86bfee7dad468fc27e778ceb2 /gcc/tree-scalar-evolution.c
parentc045ea5763f0148e0d38dc71174b523c84143d68 (diff)
downloadgcc-cd5091f1eab0b6f19a1f0557bf40d1aa9ec34dd4.zip
gcc-cd5091f1eab0b6f19a1f0557bf40d1aa9ec34dd4.tar.gz
gcc-cd5091f1eab0b6f19a1f0557bf40d1aa9ec34dd4.tar.bz2
re PR middle-end/89677 (internal compiler error: in wide_int_to_tree_1, at tree.c:1549)
2019-03-13 Richard Biener <rguenther@suse.de> PR middle-end/89677 * tree-scalar-evolution.c (simplify_peeled_chrec): Do not throw FP expressions at tree-affine. * gcc.dg/torture/pr89677.c: New testcase. From-SVN: r269646
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 3de5590..c814437 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -1456,6 +1456,11 @@ simplify_peeled_chrec (struct loop *loop, tree arg, tree init_cond)
return build_polynomial_chrec (loop->num, init_cond, right);
}
+ /* The affine code only deals with pointer and integer types. */
+ if (!POINTER_TYPE_P (type)
+ && !INTEGRAL_TYPE_P (type))
+ return chrec_dont_know;
+
/* Try harder to check if they are equal. */
tree_to_aff_combination_expand (left, type, &aff1, &peeled_chrec_map);
tree_to_aff_combination_expand (step_val, type, &aff2, &peeled_chrec_map);