# HG changeset patch # User Tomas Lindquist Olsen # Date 1218769713 -7200 # Node ID a0b0676e787d1f416e22cac3e5685fcf343231d0 # Parent 6aee82889553f7da34a6cd121eb186cced547cd5 Fixed problem when instantiating a template with private global variables. diff -r 6aee82889553 -r a0b0676e787d gen/toobj.cpp --- a/gen/toobj.cpp Thu Aug 14 06:55:41 2008 +0200 +++ b/gen/toobj.cpp Fri Aug 15 05:08:33 2008 +0200 @@ -621,8 +621,11 @@ // global variable or magic if (isDataseg()) { + Logger::println("data segment"); + // we don't want to touch private static members at all !!! - if ((prot() == PROTprivate) && getModule() != gIR->dmodule) + // template instances should always be emitted + if (!DtoIsTemplateInstance(this) && prot() == PROTprivate && getModule() != gIR->dmodule) return; // don't duplicate work