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]

[lto] Do not try to set assembler name on unused FUNCTION_DECLs


This was causing ICEs in ~20 libstdc++ tests.

Tested on x86_64.


Diego.


2008-12-29  Diego Novillo  <dnovillo@google.com>

	* tree.c (set_asm_name): Do not try to set the assembler
	name for unused FUNCTION_DECLs.

Index: tree.c
===================================================================
--- tree.c	(revision 142949)
+++ tree.c	(working copy)
@@ -4008,7 +4008,9 @@ set_asm_name (void **slot, void *unused 
       && (TREE_CODE (decl) != VAR_DECL
 	  || TREE_STATIC (decl)
 	  || TREE_PUBLIC (decl)
-	  || DECL_EXTERNAL (decl)))
+	  || DECL_EXTERNAL (decl))
+      && (TREE_CODE (decl) != FUNCTION_DECL
+	  || TREE_USED (decl)))
     lang_hooks.set_decl_assembler_name (decl);
   return 1;
 }


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