This fixes ICEs when trying to merge functions and variables. As this is a fatal error in the end no need to try doing sth fancy.
Applied as obvious. Richard. 2016-01-18 Richard Biener <rguent...@suse.de> PR lto/69337 * lto-symtab.c (lto_symtab_merge): Return early for mismatched function vs. variable. Index: gcc/lto/lto-symtab.c =================================================================== *** gcc/lto/lto-symtab.c (revision 232496) --- gcc/lto/lto-symtab.c (working copy) *************** lto_symtab_merge (symtab_node *prevailin *** 303,308 **** --- 303,311 ---- if (prevailing_decl == decl) return true; + if (TREE_CODE (decl) != TREE_CODE (prevailing_decl)) + return false; + /* Merge decl state in both directions, we may still end up using the new decl. */ TREE_ADDRESSABLE (prevailing_decl) |= TREE_ADDRESSABLE (decl);