* print-tree.c (print_node): Simplify.
* varpool.c (tls_model_names): New variable.
(dump_varpool_node): Output tls model.
* lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211865
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-06-20 Jan Hubicka <hubicka@ucw.cz>
+
+ * cgraph.h (tls_model_names): New variable.
+ * print-tree.c (print_node): Simplify.
+ * varpool.c (tls_model_names): New variable.
+ (dump_varpool_node): Output tls model.
+
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* ipa-visibility.c (function_and_variable_visibility): Disable
extern const char * const cgraph_availability_names[];
extern const char * const ld_plugin_symbol_resolution_names[];
+extern const char * const tls_model_names[];
/* Information about thunk, used only for same body aliases. */
+2014-06-20 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-symtab.c (lto_varpool_replace_node): Report TLS model conflicts.
+
2014-06-20 Jan Hubicka <hubicka@ucw.cz>
* lto.c (compare_tree_sccs_1): Do not compare priorities.
if (DECL_INITIAL (vnode->decl)
&& vnode->decl != prevailing_node->decl)
DECL_INITIAL (vnode->decl) = error_mark_node;
+
+ if (vnode->tls_model != prevailing_node->tls_model)
+ {
+ error_at (DECL_SOURCE_LOCATION (vnode->decl),
+ "%qD is defined as %s", vnode->decl, tls_model_names [vnode->tls_model]);
+ inform (DECL_SOURCE_LOCATION (prevailing_node->decl),
+ "previously defined here as %s",
+ tls_model_names [prevailing_node->tls_model]);
+ }
/* Finally remove the replaced node. */
varpool_remove_node (vnode);
}
fputs (" common", file);
if (code == VAR_DECL && DECL_THREAD_LOCAL_P (node))
{
- enum tls_model kind = DECL_TLS_MODEL (node);
- switch (kind)
- {
- case TLS_MODEL_GLOBAL_DYNAMIC:
- fputs (" tls-global-dynamic", file);
- break;
- case TLS_MODEL_LOCAL_DYNAMIC:
- fputs (" tls-local-dynamic", file);
- break;
- case TLS_MODEL_INITIAL_EXEC:
- fputs (" tls-initial-exec", file);
- break;
- case TLS_MODEL_LOCAL_EXEC:
- fputs (" tls-local-exec", file);
- break;
- default:
- gcc_unreachable ();
- }
+ fputs (" ", file);
+ fputs (tls_model_names[DECL_TLS_MODEL (node)], file);
}
if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))
#include "flags.h"
#include "pointer-set.h"
+const char * const tls_model_names[]={"none", "tls-emulated", "tls-real",
+ "tls-global-dynamic", "tls-local-dynamic",
+ "tls-initial-exec", "tls-local-exec"};
+
/* List of hooks triggered on varpool_node events. */
struct varpool_node_hook_list {
varpool_node_hook hook;
fprintf (f, " const-value-known");
if (node->writeonly)
fprintf (f, " write-only");
+ if (node->tls_model)
+ fprintf (f, " %s", tls_model_names [node->tls_model]);
fprintf (f, "\n");
}