Commit 9142736e by Richard Biener Committed by Richard Biener

lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.

2019-10-10  Richard Biener  <rguenther@suse.de>

	* lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.

From-SVN: r276796
parent 80f8cd77
2019-10-10 Richard Biener <rguenther@suse.de>
* lto-common.c (unify_scc): Do not merge anonymous NAMESPACE_DECLs.
2019-10-04 Joseph Myers <joseph@codesourcery.com> 2019-10-04 Joseph Myers <joseph@codesourcery.com>
* lto-lang.c (flag_isoc2x): New variable. * lto-lang.c (flag_isoc2x): New variable.
......
...@@ -1646,11 +1646,13 @@ unify_scc (class data_in *data_in, unsigned from, ...@@ -1646,11 +1646,13 @@ unify_scc (class data_in *data_in, unsigned from,
tree t = streamer_tree_cache_get_tree (cache, from + i); tree t = streamer_tree_cache_get_tree (cache, from + i);
scc->entries[i] = t; scc->entries[i] = t;
/* Do not merge SCCs with local entities inside them. Also do /* Do not merge SCCs with local entities inside them. Also do
not merge TRANSLATION_UNIT_DECLs and anonymous namespace types. */ not merge TRANSLATION_UNIT_DECLs and anonymous namespaces
and types therein types. */
if (TREE_CODE (t) == TRANSLATION_UNIT_DECL if (TREE_CODE (t) == TRANSLATION_UNIT_DECL
|| (VAR_OR_FUNCTION_DECL_P (t) || (VAR_OR_FUNCTION_DECL_P (t)
&& !(TREE_PUBLIC (t) || DECL_EXTERNAL (t))) && !(TREE_PUBLIC (t) || DECL_EXTERNAL (t)))
|| TREE_CODE (t) == LABEL_DECL || TREE_CODE (t) == LABEL_DECL
|| (TREE_CODE (t) == NAMESPACE_DECL && !DECL_NAME (t))
|| (TYPE_P (t) || (TYPE_P (t)
&& type_with_linkage_p (TYPE_MAIN_VARIANT (t)) && type_with_linkage_p (TYPE_MAIN_VARIANT (t))
&& type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t)))) && type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment