+2015-08-31 Richard Biener <rguenther@suse.de>
+
+ * lto-symtab.c (lto_symtab_prevailing_decl): Remove redundant
+ test, do not replace a non-builtin with a builtin.
+ * lto.c (compare_tree_sccs_1): Do not merge things we stream
+ as builtins vs. non-builtins.
+
2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
* lto.h: Remove useless typedefs.
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT_P (decl))
return decl;
- /* Likewise builtins are their own prevailing decl. This preserves
- non-builtin vs. builtin uses from compile-time. */
- if (TREE_CODE (decl) == FUNCTION_DECL && DECL_BUILT_IN (decl))
- return decl;
-
/* Ensure DECL_ASSEMBLER_NAME will not set assembler name. */
gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl));
if (!ret)
return decl;
+ /* Do not replace a non-builtin with a builtin. */
+ if (is_builtin_fn (ret->decl))
+ return decl;
+
return ret->decl;
}
return false;
- /* We don't want to compare locations, so there is nothing do compare
- for TS_DECL_MINIMAL. */
+ /* We want to compare locations up to the point where it makes
+ a difference for streaming - thus whether the decl is builtin or not. */
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_MINIMAL))
+ compare_values (streamer_handle_as_builtin_p);
if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
{