+2016-11-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77285
+ * mangle.c (mangle_tls_init_fn, mangle_tls_wrapper_fn): Call
+ check_abi_tags.
+
2016-11-18 Jason Merrill <jason@redhat.com>
PR c++/67631 - list-init and explicit conversions
tree
mangle_tls_init_fn (const tree variable)
{
+ check_abi_tags (variable);
start_mangling (variable);
write_string ("_ZTH");
write_guarded_var_name (variable);
tree
mangle_tls_wrapper_fn (const tree variable)
{
+ check_abi_tags (variable);
start_mangling (variable);
write_string (TLS_WRAPPER_PREFIX);
write_guarded_var_name (variable);
+2016-11-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/77285
+ * g++.dg/tls/pr77285-1.C: New test.
+ * g++.dg/tls/pr77285-2.C: New test.
+
2016-11-18 Jeff Law <law@redhat.com>
PR target/25112
--- /dev/null
+// { dg-do link { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-additional-sources pr77285-2.C }
+
+struct __attribute__((abi_tag("tag"))) X { ~X () {} int i = 0; };
+thread_local X var1;
+X var2;
--- /dev/null
+// PR c++/77285
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_Z4var1B3tag" } }
+// { dg-final { scan-assembler "_Z4var2B3tag" } }
+// { dg-final { scan-assembler "_ZTH4var1B3tag" } }
+// { dg-final { scan-assembler "_ZTW4var1B3tag" } }
+
+struct __attribute__((abi_tag("tag"))) X { ~X () {} int i = 0; };
+extern thread_local X var1;
+extern X var2;
+
+int
+main ()
+{
+ return var1.i + var2.i;
+}