http://d.puremagic.com/issues/show_bug.cgi?id=3243


Jeremie Pelletier <jerem...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |jerem...@gmail.com


--- Comment #1 from Jeremie Pelletier <jerem...@gmail.com> 2009-09-08 16:00:15 
PDT ---
Here's the patch:

--- orig\func.cpp       Thu Sep 03 01:01:40 2009
+++ dmd\func.cpp        Tue Sep 08 18:54:46 2009
@@ -2759,7 +2759,7 @@
         */
        Identifier *id = Lexer::idPool("__gate");
        VarDeclaration *v = new VarDeclaration(0, Type::tint32, id, NULL);
-       v->storage_class = STCstatic;
+       v->storage_class = STCstatic | STCgshared;
        Statements *sa = new Statements();
        Statement *s = new DeclarationStatement(0, v);
        sa->push(s);

When a static constructor is coming from a template, a "gate" is added to
prevent running it more than once. That gate was not marked with __gshared.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to