diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-06-03 21:21:12 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-06-03 19:21:12 +0000 |
commit | 49379cb193813bf13c066d2f0404098a721fa505 (patch) | |
tree | 060e2124fba0d3ce8c58d84f78e4fd572ee45d0c | |
parent | 66f97d31f233e10870728947731db603b5dc0c9c (diff) | |
download | gcc-49379cb193813bf13c066d2f0404098a721fa505.zip gcc-49379cb193813bf13c066d2f0404098a721fa505.tar.gz gcc-49379cb193813bf13c066d2f0404098a721fa505.tar.bz2 |
re PR tree-optimization/32194 (ice for legal code with -O3 with complex in loop)
PR tree-optimization/32194
* tree-predcom.c (determine_offset): Check that both references have
the same type.
From-SVN: r125298
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-predcom.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2214ddf..39dd070 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2007-06-03 Zdenek Dvorak <dvorakz@suse.cz> + PR tree-optimization/32194 + * tree-predcom.c (determine_offset): Check that both references have + the same type. + +2007-06-03 Zdenek Dvorak <dvorakz@suse.cz> + * cfgloopmanip.c (remove_path, loopify, duplicate_loop_to_header_edge): Change dom_bbs to vector. Add argument to iterate_fix_dominators call. * loop-unroll.c (unroll_loop_runtime_iterations): Ditto. diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index b5c8292..15fcafe 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. */ |