Never make external variables something else than external.

Fixes crash in DMD testcase 'mangle'.
This commit is contained in:
David Nadlinger 2013-06-15 23:22:34 +02:00
parent 46b6fdd531
commit 0305d3bce2

View file

@ -1546,6 +1546,13 @@ bool mustDefineSymbol(Dsymbol* s)
}
}
if (VarDeclaration* vd = s->isVarDeclaration())
{
// Never define 'extern' variables.
if (vd->storage_class & STCextern)
return false;
}
// Inlining checks may create some variable and class declarations
// we don't need to emit.
if (global.inExtraInliningSemantic)