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
This commit is contained in:
Zdenek Dvorak 2007-06-03 21:21:12 +02:00 committed by Zdenek Dvorak
parent 66f97d31f2
commit 49379cb193
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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):

View File

@ -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. */