[Bug regression/61436] [4.10 Regression]: g++.dg/tls/diag-1.C ICE (emutls)
hubicka at ucw dot cz
gcc-bugzilla@gcc.gnu.org
Mon Jun 9 09:02:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61436
--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
it seems that get_emutls_init_templ_addr just create the comdat too early
and we trigger sanity check that symbols are static and not automatic
variables.
I have busy day tomorrow, so won't beat if anyone beats me in testing if
this fix works.
Honza
Index: tree-emutls.c
===================================================================
--- tree-emutls.c (revision 211363)
+++ tree-emutls.c (working copy)
@@ -250,10 +250,10 @@ get_emutls_init_templ_addr (tree decl)
DECL_WEAK (to) = DECL_WEAK (decl);
if (DECL_ONE_ONLY (decl))
{
- make_decl_one_only (to, DECL_ASSEMBLER_NAME (to));
TREE_STATIC (to) = TREE_STATIC (decl);
TREE_PUBLIC (to) = TREE_PUBLIC (decl);
DECL_VISIBILITY (to) = DECL_VISIBILITY (decl);
+ make_decl_one_only (to, DECL_ASSEMBLER_NAME (to));
}
else
TREE_STATIC (to) = 1;
More information about the Gcc-bugs
mailing list