diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-05 10:56:01 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-05 10:56:01 +0000 |
commit | 6b0ce647e10938ceba871c3ca68ce18bf141ee18 (patch) | |
tree | c205d65c8eaae723466d51eded56f2fe8582c111 /gcc/tree-ssa-alias.c | |
parent | 9310c946c39d47392a429f34289f5a748635baa4 (diff) | |
download | ppe42-gcc-6b0ce647e10938ceba871c3ca68ce18bf141ee18.tar.gz ppe42-gcc-6b0ce647e10938ceba871c3ca68ce18bf141ee18.zip |
PR tree-optimization/18307
* tree-ssa-alias.c (merge_pointed_to_info): Protected against DEST
and ORIG being the same node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90120 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 976f2d1b0fc..8e424275b17 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1687,14 +1687,21 @@ set_pt_malloc (tree ptr) } -/* Given two pointers DEST and ORIG. Merge the points-to information in - ORIG into DEST. AI is as in collect_points_to_info. */ +/* Given two different pointers DEST and ORIG. Merge the points-to + information in ORIG into DEST. AI is as in + collect_points_to_info. */ static void 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; + /* Make sure we have points-to information for ORIG. */ collect_points_to_info_for (ai, orig); @@ -1725,6 +1732,8 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig) smart enough to determine that the two come from the same malloc call. Copy propagation before aliasing should cure this. */ + gcc_assert (orig_pi != dest_pi); + dest_pi->pt_malloc = 0; if (orig_pi->pt_malloc || orig_pi->pt_anything) |