diff options
author | Xinliang David Li <davidxl@google.com> | 2011-02-12 00:12:52 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@gcc.gnu.org> | 2011-02-12 00:12:52 +0000 |
commit | 1bbc6693c956cbcda5983c21c8fab5d834e17b8f (patch) | |
tree | a9b6229128c042546c7a0a161ca69a3f4c7b9ecd /gcc/tree-chrec.c | |
parent | 1da7d8c0d37ae794a9161cbb978218c0c6a4d086 (diff) | |
download | gcc-1bbc6693c956cbcda5983c21c8fab5d834e17b8f.zip gcc-1bbc6693c956cbcda5983c21c8fab5d834e17b8f.tar.gz gcc-1bbc6693c956cbcda5983c21c8fab5d834e17b8f.tar.bz2 |
Fix PR47707
From-SVN: r170062
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index c721d43..1e49c1d 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1238,8 +1238,11 @@ convert_affine_scev (struct loop *loop, tree type, performed by default when CT is signed. */ new_step = *step; if (TYPE_PRECISION (step_type) > TYPE_PRECISION (ct) && TYPE_UNSIGNED (ct)) - new_step = chrec_convert_1 (signed_type_for (ct), new_step, at_stmt, - use_overflow_semantics); + { + tree signed_ct = build_nonstandard_integer_type (TYPE_PRECISION (ct), 0); + new_step = chrec_convert_1 (signed_ct, new_step, at_stmt, + use_overflow_semantics); + } new_step = chrec_convert_1 (step_type, new_step, at_stmt, use_overflow_semantics); if (automatically_generated_chrec_p (new_base) @@ -1579,4 +1582,3 @@ evolution_function_right_is_integer_cst (const_tree chrec) return false; } } - |