Increment vgates in static constructors. That fixes static destructors of templates.

This commit is contained in:
Alexey Prokhin
2011-01-02 17:43:02 +03:00
parent a86f414bc1
commit 8a49067776
4 changed files with 39 additions and 13 deletions

View File

@@ -3447,7 +3447,7 @@ void StaticDtorDeclaration::semantic(Scope *sc)
Statement *s = new DeclarationStatement(0, v);
sa->push(s);
Expression *e = new IdentifierExp(0, id);
e = new AddAssignExp(0, e, new IntegerExp((uint64_t)-1));
e = new AddAssignExp(0, e, new IntegerExp((uint64_t)-1));
e = new EqualExp(TOKnotequal, 0, e, new IntegerExp(0));
s = new IfStatement(0, NULL, e, new ReturnStatement(0, NULL), NULL);
sa->push(s);