summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 14:46:23 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-24 14:46:23 +0000
commit212f7f4c51b42e96cdca67dfa15dd43b5a6a9745 (patch)
tree01ff430a15b7d8a7738ce4596cf0c4dd0e967fa8
parentfe16419530e010e8009ee8a03ec6d2babe90ea78 (diff)
downloadgcc-212f7f4c51b42e96cdca67dfa15dd43b5a6a9745.tar.gz
* tree-ssa-alias.c (merge_pointed_to_info): Fix comment
regarding PT_MALLOC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91164 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-alias.c25
2 files changed, 16 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2823c0e2fcd..82a31f1f594 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-24 Diego Novillo <dnovillo@redhat.com>
+
+ * tree-ssa-alias.c (merge_pointed_to_info): Fix comment
+ regarding PT_MALLOC.
+
2004-11-24 Joseph Myers <joseph@codesourcery.com>
* config/i386/i386.c (optimization_options): Use
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 46778fac35f..0e30f126d30 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -1714,20 +1714,17 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig)
...
P_j = P_i + X;
- P_j would be marked as PT_MALLOC, which is wrong because
- PT_MALLOC implies that the pointer may not point to another
- variable.
-
- FIXME 1: Subsequent analysis may determine that P_j
- cannot alias anything else, but we are being conservative
- here.
-
- FIXME 2: If the merging comes from a copy assignment, we
- ought to merge PT_MALLOC, but then both pointers would end up
- getting different name tags because create_name_tags is not
- smart enough to determine that the two come from the same
- malloc call. Copy propagation before aliasing should cure
- this. */
+ P_j would be marked as PT_MALLOC, however we currently do not
+ handle cases of more than one pointer pointing to the same
+ malloc'd area.
+
+ FIXME: If the merging comes from an expression that preserves
+ the PT_MALLOC attribute (copy assignment, address
+ arithmetic), we ought to merge PT_MALLOC, but then both
+ pointers would end up getting different name tags because
+ create_name_tags is not 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;