aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-09-24 17:38:36 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-09-24 10:38:36 -0700
commit532c67ca934a0926455c5a1f745233a4ee3dc2fb (patch)
treeafed02e6556ed84602920335fcca293f65ff6255
parent085e33aa0ad674c2680e6216b7d84737b935351c (diff)
downloadgcc-532c67ca934a0926455c5a1f745233a4ee3dc2fb.zip
gcc-532c67ca934a0926455c5a1f745233a4ee3dc2fb.tar.gz
gcc-532c67ca934a0926455c5a1f745233a4ee3dc2fb.tar.bz2
re PR tree-optimization/16954 (ICE in get_tmt_for with IMA and incomplete structs)
2004-09-24 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/16954 * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Prevent renaming if the aliasing sets of the type which the pointer points to are different. From-SVN: r88064
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-ssa-copyrename.c12
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e522714..6e237dc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-24 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/16954
+ * tree-ssa-copyrename.c (copy_rename_partition_coalesce):
+ Prevent renaming if the aliasing sets of the type which the
+ pointer points to are different.
+
2004-09-24 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/17188
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c
index 49225d0..4ef5b3d 100644
--- a/gcc/tree-ssa-copyrename.c
+++ b/gcc/tree-ssa-copyrename.c
@@ -261,6 +261,18 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug)
return;
}
+ /* Don't coalesce if the aliasing sets of the types are different. */
+ if (POINTER_TYPE_P (TREE_TYPE (root1))
+ && POINTER_TYPE_P (TREE_TYPE (root2))
+ && get_alias_set (TREE_TYPE (TREE_TYPE (root1)))
+ != get_alias_set (TREE_TYPE (TREE_TYPE (root2))))
+ {
+ if (debug)
+ fprintf (debug, " : 2 different alasing sets. No coalesce.\n");
+ return;
+ }
+
+
/* Merge the two partitions. */
p3 = partition_union (map->var_partition, p1, p2);