This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Fix PR/15666: [gcc 3.4 regression]: Abort on valid code
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 01 Jun 2004 01:00:44 -0300
- Subject: Re: PATCH: Fix PR/15666: [gcc 3.4 regression]: Abort on valid code
- Organization: Red Hat Global Engineering Services Compiler Team
- References: <20040531212039.GB32044@lucon.org>
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}