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]

Re: PATCH: Fix PR/15666: [gcc 3.4 regression]: Abort on valid code

On May 31, 2004, "H. J. Lu" <> 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  <>

	* 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));
 	    init_block_move_fn (starred);
Alexandre Oliva   
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

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