summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 21:07:03 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-17 21:07:03 +0000
commitef88e2769858fe73c145cf38d7295d6293c322c0 (patch)
tree337a05ea5b2fb625155a270527aab5e2894f68d0
parentf75ffe10e06fb74e0d5728c12426dc8804c95978 (diff)
downloadppe42-gcc-ef88e2769858fe73c145cf38d7295d6293c322c0.tar.gz
ppe42-gcc-ef88e2769858fe73c145cf38d7295d6293c322c0.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90816 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-ssa-alias.c12
2 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 932744504a1..6bf212a17f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-11-17 Diego Novillo <dnovillo@redhat.com>
+
+ 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.
+
2004-11-17 Steven Bosscher <stevenb@suse.de>
* tree-ssa-propagate.c (cfg_blocks_add) Assert we're not trying
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 2da76ce6bb5..aee68d3c58c 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:
OpenPOWER on IntegriCloud