]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libphobos/libdruntime/core/thread/threadbase.d
d: Merge upstream dmd 3982604c5, druntime bc58b1e9, phobos 12329adb6.
[thirdparty/gcc.git] / libphobos / libdruntime / core / thread / threadbase.d
index 4592bf1d9757c98c900efea7dac0261d50cbbdde..9cee4d8d77d270520011a851f4c5210ef54879c6 100644 (file)
@@ -771,10 +771,7 @@ package void thread_term_tpl(ThreadT, MainThreadStore)(ref MainThreadStore _main
     // destruct manually as object.destroy is not @nogc
     (cast(ThreadT) cast(void*) ThreadBase.sm_main).__dtor();
     _d_monitordelete_nogc(ThreadBase.sm_main);
-    if (typeid(ThreadT).initializer.ptr)
-        _mainThreadStore[] = typeid(ThreadT).initializer[];
-    else
-        (cast(ubyte[])_mainThreadStore)[] = 0;
+    _mainThreadStore[] = __traits(initSymbol, ThreadT)[];
     ThreadBase.sm_main = null;
 
     assert(ThreadBase.sm_tbeg && ThreadBase.sm_tlen == 1);