This is the mail archive of the
mailing list for the GCC project.
Fix PR 19670
- From: Diego Novillo <dnovillo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 01 Feb 2005 15:35:24 -0500
- Subject: Fix PR 19670
- Organization: Red Hat Canada
The alias verifier thinks it's found a pointer that has no pointed-to
set variables, but it really hasn't. The verifier is visiting a dead
PHI which takes the address of a variable, but since the PHI node is
dead, the alias analyzer never sees it.
The verifier marks the pointer visited and then fails when it finds no
variables in the pointed-to set for the pointer. The solution is to
only mark a name visited if we see it *used* in the IL, not just defined.
If the statement that uses the pointer is itself dead, this would still
work because the alias analyzer would've processed the pointer anyway.
Bootstrapped and tested x86, ppc, ia64 and x86-64 (alpha does not
bootstrap today for a problem unrelated to this patch).
2005-02-01 Diego Novillo <firstname.lastname@example.org>
* tree-ssa.c (verify_ssa_name): Don't set TREE_VISITED
(verify_use): ... set it here, instead.
RCS file: /cvs/gcc/gcc/gcc/tree-ssa.c,v
retrieving revision 2.73
diff -d -u -p -r2.73 tree-ssa.c
--- tree-ssa.c 24 Jan 2005 20:47:43 -0000 2.73
+++ tree-ssa.c 1 Feb 2005 20:14:55 -0000
@@ -108,8 +108,6 @@ flush_pending_stmts (edge e)
verify_ssa_name (tree ssa_name, bool is_virtual)
- TREE_VISITED (ssa_name) = 1;
if (TREE_CODE (ssa_name) != SSA_NAME)
error ("Expected an SSA_NAME object");
@@ -219,6 +217,7 @@ verify_use (basic_block bb, basic_block
bool err = false;
err = verify_ssa_name (ssa_name, is_virtual);
+ TREE_VISITED (ssa_name) = 1;
if (IS_EMPTY_STMT (SSA_NAME_DEF_STMT (ssa_name))
&& var_ann (SSA_NAME_VAR (ssa_name))->default_def == ssa_name)