diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-07-27 15:32:47 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-07-27 11:32:47 -0400 |
commit | 9ae2a5d113b83ce7e61a50f5484e6221d81a2c5c (patch) | |
tree | 2b9d2fb0b1c90b07e3cc9d57a576a487ffca1759 /gcc/tree-ssa-alias.c | |
parent | 45d09c02e544c4074aa4a69925c1fe547a0dd7a0 (diff) | |
download | gcc-9ae2a5d113b83ce7e61a50f5484e6221d81a2c5c.zip gcc-9ae2a5d113b83ce7e61a50f5484e6221d81a2c5c.tar.gz gcc-9ae2a5d113b83ce7e61a50f5484e6221d81a2c5c.tar.bz2 |
tree-ssa-alias.c (create_name_tags): Ignore pointers that don't have PT_VARS nor PT_MALLOC set.
* tree-ssa-alias.c (create_name_tags): Ignore pointers that
don't have PT_VARS nor PT_MALLOC set.
Clear name tag from pointers that have not been dereferenced.
(set_pt_anything, set_pt_malloc): Forward declare.
* tree-ssa-copy.c (may_propagate_copy): Compare alias sets,
not type compatibility when determining if a pointer can be
copy propagated.
testsuite/ChangeLog
* gcc.c-torture/compile/20040727-1.c: New test.
From-SVN: r85220
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index fab9e02..033a707 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -157,6 +157,8 @@ static bool ptr_is_dereferenced_by (tree, tree, bool *); static void maybe_create_global_var (struct alias_info *ai); static void group_aliases (struct alias_info *); static struct ptr_info_def *get_ptr_info (tree t); +static void set_pt_anything (tree ptr); +static void set_pt_malloc (tree ptr); /* Global declarations. */ @@ -773,7 +775,12 @@ create_name_tags (struct alias_info *ai) struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr); if (!pi->is_dereferenced) - continue; + { + /* No name tags for pointers that have not been + dereferenced. */ + pi->name_mem_tag = NULL_TREE; + continue; + } if (pi->pt_vars) { @@ -828,7 +835,8 @@ create_name_tags (struct alias_info *ai) /* Only pointers that may point to malloc or other variables may receive a name tag. If the pointer does not point to a known spot, we should use type tags. */ - abort (); + set_pt_anything (ptr); + continue; } /* Mark the new name tag for renaming. */ |