diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 19:21:12 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 19:21:12 +0000 |
commit | ca4882a2acf9d7c0694676f462bf7f215e7352c0 (patch) | |
tree | 060e2124fba0d3ce8c58d84f78e4fd572ee45d0c /gcc/tree-predcom.c | |
parent | 3f9439d71f45a5eb2d699fb5b6d819143031b5db (diff) | |
download | gcc-ca4882a2acf9d7c0694676f462bf7f215e7352c0.tar.gz |
PR tree-optimization/32194
* tree-predcom.c (determine_offset): Check that both references have
the same type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r-- | gcc/tree-predcom.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index b5c82923ee2..15fcafe76e1 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -628,6 +628,13 @@ determine_offset (struct data_reference *a, struct data_reference *b, double_int *off) { aff_tree diff, baseb, step; + tree typea, typeb; + + /* Check that both the references access the location in the same type. */ + typea = TREE_TYPE (DR_REF (a)); + typeb = TREE_TYPE (DR_REF (b)); + if (!tree_ssa_useless_type_conversion_1 (typeb, typea)) + return false; /* Check whether the base address and the step of both references is the same. */ |