aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2004-11-17 21:07:03 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2004-11-17 16:07:03 -0500
commit730bddf26ca4e5222b4130535b6bc705943f5d8b (patch)
tree337a05ea5b2fb625155a270527aab5e2894f68d0 /gcc/tree-ssa-alias.c
parent7c278f7987584a3371136b2812771427340df606 (diff)
downloadgcc-730bddf26ca4e5222b4130535b6bc705943f5d8b.zip
gcc-730bddf26ca4e5222b4130535b6bc705943f5d8b.tar.gz
gcc-730bddf26ca4e5222b4130535b6bc705943f5d8b.tar.bz2
re PR tree-optimization/18307 (merge_pointed_to_info called incorrectly)
PR tree-optimization/18307 * tree-ssa-alias.c (merge_pointed_to_info): ICE if 'dest' and 'orig' are the same node. (collect_points_to_info_r): Do not call merge_pointed_to_info when the PHI argument is identical to the LHS. From-SVN: r90816
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 2da76ce..aee68d3 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -1697,12 +1697,8 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig)
{
struct ptr_info_def *dest_pi, *orig_pi;
- /* FIXME: It is erroneous to call this function with identical
- nodes, however that currently occurs during bootstrap. This check
- stops further breakage. PR 18307 documents the issue. */
- if (dest == orig)
- return;
-
+ gcc_assert (dest != orig);
+
/* Make sure we have points-to information for ORIG. */
collect_points_to_info_for (ai, orig);
@@ -1938,7 +1934,9 @@ collect_points_to_info_r (tree var, tree stmt, void *data)
break;
case SSA_NAME:
- merge_pointed_to_info (ai, lhs, var);
+ /* Avoid unnecessary merges. */
+ if (lhs != var)
+ merge_pointed_to_info (ai, lhs, var);
break;
default: