diff options
author | Richard Guenther <rguenther@suse.de> | 2009-02-24 11:05:15 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-02-24 11:05:15 +0000 |
commit | 71adbef3ea0454c98d098d7adfc071aa29fa0a88 (patch) | |
tree | 0a33b66def2cd7df0d170af69b8094c20b038a2c /gcc/tree-ssa-loop-ivopts.c | |
parent | f1a558e04825c6037a97465b099391cce1ca5df7 (diff) | |
download | gcc-71adbef3ea0454c98d098d7adfc071aa29fa0a88.zip gcc-71adbef3ea0454c98d098d7adfc071aa29fa0a88.tar.gz gcc-71adbef3ea0454c98d098d7adfc071aa29fa0a88.tar.bz2 |
re PR tree-optimization/39233 (ivopts + vrp miscompilation)
2009-02-24 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/39233
* tree-ssa-loop-ivopts.c (add_candidate_1): Do not except pointers
from converting them to a generic type.
* gcc.c-torture/execute/pr39233.c: New testcase.
Co-Authored-By: Zdenek Dvorak <ook@ucw.cz>
From-SVN: r144405
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index ca1ab98..b1813d3 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -2071,9 +2071,7 @@ add_candidate_1 (struct ivopts_data *data, { orig_type = TREE_TYPE (base); type = generic_type_for (orig_type); - /* Don't convert the base to the generic type for pointers as the generic - type is an integer type with the same size as the pointer type. */ - if (type != orig_type && !POINTER_TYPE_P (orig_type)) + if (type != orig_type) { base = fold_convert (type, base); step = fold_convert (type, step); |