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: PATCH: Fix PR/15666: [gcc 3.4 regression]: Abort on valid code


On May 31, 2004, "H. J. Lu" <hjl@lucon.org> wrote:

> is "using DECL_ASSEMBLER_NAME for a key in cgraph." It doesn't work
> when DECL_ASSEMBLER_NAME changes as it is shown in the PR since the
> hash values in the cgraph hash table used for insertion and lookup
> may be different for the same node. Gcc mainline doesn't have the
> problem since it uses DECL_UID as key. This patch is a workaround
> for gcc 3.4.

I ran into what appears to be the same problem during the weekend.
Here's the patch (for mainline) that fixed the problem for me.  Does
it fix it for you as well?

I'm almost done bootstrapping this on mainline now.  Ok to install?
How about 3.4?

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

	* c-decl.c (finish_decl): Use change_decl_assembler_name for the
	builtin decl as well.

Index: gcc/c-decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
retrieving revision 1.504
diff -u -p -r1.504 c-decl.c
--- gcc/c-decl.c 31 May 2004 22:06:27 -0000 1.504
+++ gcc/c-decl.c 1 Jun 2004 03:59:07 -0000
@@ -2886,7 +2886,7 @@ finish_decl (tree decl, tree init, tree 
 	{
 	  tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
 	  SET_DECL_RTL (builtin, NULL_RTX);
-	  SET_DECL_ASSEMBLER_NAME (builtin, get_identifier (starred));
+	  change_decl_assembler_name (builtin, get_identifier (starred));
 #ifdef TARGET_MEM_FUNCTIONS
 	  if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
 	    init_block_move_fn (starred);
-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

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