Commit 25f91fda by Richard Biener Committed by Richard Biener

re PR tree-optimization/84929 (ICE at -O3 on valid code on x86_64-linux-gnu:…

re PR tree-optimization/84929 (ICE at -O3 on valid code on x86_64-linux-gnu: tree check: expected polynomial_chrec, have nop_expr in analyze_siv_subscript_cst_affine, at tree-data-ref.c:3018)

2018-03-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84929
	* tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
	chrec_is_positive against non-chrec arg.

	* gcc.dg/torture/pr84929.c: New testcase.

From-SVN: r258643
parent 8455b50e
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84929
* tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
chrec_is_positive against non-chrec arg.
2018-03-19 Tamar Christina <tamar.christina@arm.com>
PR target/84711
......
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84929
* gcc.dg/torture/pr84929.c: New testcase.
2018-03-19 Tamar Christina <tamar.christina@arm.com>
PR target/84711
......
/* { dg-do compile } */
/* { dg-require-effective-target int32plus } */
int a[4];
void fn1()
{
__UINT64_TYPE__ b = 7818038963515661296;
for (;; b++)
a[0xA699ECD2C348A3A0] = a[b];
}
......@@ -3015,7 +3015,8 @@ analyze_siv_subscript_cst_affine (tree chrec_a,
{
if (value0 == false)
{
if (!chrec_is_positive (CHREC_RIGHT (chrec_b), &value1))
if (TREE_CODE (chrec_b) != POLYNOMIAL_CHREC
|| !chrec_is_positive (CHREC_RIGHT (chrec_b), &value1))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "siv test failed: chrec not positive.\n");
......@@ -3096,7 +3097,8 @@ analyze_siv_subscript_cst_affine (tree chrec_a,
}
else
{
if (!chrec_is_positive (CHREC_RIGHT (chrec_b), &value2))
if (TREE_CODE (chrec_b) != POLYNOMIAL_CHREC
|| !chrec_is_positive (CHREC_RIGHT (chrec_b), &value2))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "siv test failed: chrec not positive.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment