http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59469
--- Comment #44 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index da76b10511f0..e47679239d84 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -97,7 +97,7 @@ get_symbol_class (symtab_node *node) /* Linker discardable symbols are duplicated to every use unless they are keyed. Keyed symbols or those. */ - if (DECL_ONE_ONLY (node->decl) + if ((DECL_COMDAT (node->decl) || DECL_ONE_ONLY (node->decl)) && !node->force_output && !node->forced_by_abi && !symtab_used_from_object_file_p (node)) fixes the issue for me. With this LLVM-3.4 now compiles fine with LTO. (LLVM trunk build still fails, but it looks like an LLVM bug to me.)