This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [vta,trunk?] stabilize hashing of SSA names and builtin function DECLs


On Oct 29, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:

> -	  val = iterative_hash_pointer (built_in_decls[DECL_FUNCTION_CODE (t)], 
> -				      val);
> -	  return val;
> +	  t = built_in_decls[DECL_FUNCTION_CODE (t)];
> +	  code = TREE_CODE (t);

This caused many testsuite regressions in the branch, when t was
assigned NULL because a builtin wasn't available.  Here's a fix I'm
installing in the branch.

Index: gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree.c (iterative_hash_expr): Don't take a NULL built in decl.

Index: gcc/tree.c
===================================================================
--- gcc/tree.c.orig	2008-10-29 18:02:57.000000000 -0200
+++ gcc/tree.c	2008-11-17 15:05:45.000000000 -0200
@@ -5348,7 +5348,7 @@ iterative_hash_expr (const_tree t, hashv
 	 __builtin__ form.  Otherwise nodes that compare equal
 	 according to operand_equal_p might get different
 	 hash codes.  */
-      if (DECL_BUILT_IN (t))
+      if (DECL_BUILT_IN (t) && built_in_decls[DECL_FUNCTION_CODE (t)])
 	{
 	  t = built_in_decls[DECL_FUNCTION_CODE (t)];
 	  code = TREE_CODE (t);

-- 
Alexandre Oliva           http://www.lsd.ic.unicamp.br/~oliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

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