summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-18 07:31:30 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-18 07:31:30 +0000
commit7298dc8b4fdc5b63bd6a66535432f20befa15fbc (patch)
treefe05dda72592a1cc1bfa37384e18d975a9caf42f /gcc/tree-ssa.c
parenta6526ba073e55bf93701fb10ca116114b0cac79b (diff)
downloadgcc-7298dc8b4fdc5b63bd6a66535432f20befa15fbc.tar.gz
* tree-into-ssa.c (rewrite_ssa_into_ssa): Expect ssa_name to return
NULL. * tree-ssa-alias.c (init_alias_info): Likewise. * tree-ssa.c (verify_flow_sensitive_alias_info): Likewise. (verify_ssa): Likewise. * tree-ssanames.c (make_ssa_name): Clear out ssa_names arrays. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 21dc59aac02..2c5cf5ab160 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -419,6 +419,8 @@ verify_flow_sensitive_alias_info (void)
struct ptr_info_def *pi;
ptr = ssa_name (i);
+ if (!ptr)
+ continue;
ann = var_ann (SSA_NAME_VAR (ptr));
pi = SSA_NAME_PTR_INFO (ptr);
@@ -466,25 +468,26 @@ verify_flow_sensitive_alias_info (void)
size_t j;
for (j = i + 1; j < num_ssa_names; j++)
- {
- tree ptr2 = ssa_name (j);
- struct ptr_info_def *pi2 = SSA_NAME_PTR_INFO (ptr2);
-
- if (!TREE_VISITED (ptr2) || !POINTER_TYPE_P (TREE_TYPE (ptr2)))
- continue;
-
- if (pi2
- && pi2->name_mem_tag
- && pi2->pt_vars
- && bitmap_first_set_bit (pi2->pt_vars) >= 0
- && pi->name_mem_tag != pi2->name_mem_tag
- && bitmap_equal_p (pi->pt_vars, pi2->pt_vars))
- {
- error ("Two pointers with different name tags and identical points-to sets");
- debug_variable (ptr2);
- goto err;
- }
- }
+ if (ssa_name (j))
+ {
+ tree ptr2 = ssa_name (j);
+ struct ptr_info_def *pi2 = SSA_NAME_PTR_INFO (ptr2);
+
+ if (!TREE_VISITED (ptr2) || !POINTER_TYPE_P (TREE_TYPE (ptr2)))
+ continue;
+
+ if (pi2
+ && pi2->name_mem_tag
+ && pi2->pt_vars
+ && bitmap_first_set_bit (pi2->pt_vars) >= 0
+ && pi->name_mem_tag != pi2->name_mem_tag
+ && bitmap_equal_p (pi->pt_vars, pi2->pt_vars))
+ {
+ error ("Two pointers with different name tags and identical points-to sets");
+ debug_variable (ptr2);
+ goto err;
+ }
+ }
}
}
@@ -524,7 +527,8 @@ verify_ssa (void)
/* Keep track of SSA names present in the IL. */
for (i = 1; i < num_ssa_names; i++)
- TREE_VISITED (ssa_name (i)) = 0;
+ if (ssa_name (i))
+ TREE_VISITED (ssa_name (i)) = 0;
calculate_dominance_info (CDI_DOMINATORS);