diff options
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index a886329..af35e41 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -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"); |