This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR 19670

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  <>

	PR tree-optimization/19670
	* tree-ssa.c (verify_ssa_name): Don't set TREE_VISITED
	(verify_use): ... set it here, instead.

Index: tree-ssa.c
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)
 static bool
 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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]