fixed bug that kept tls emulation from working

This commit is contained in:
Araq 2011-11-25 17:26:11 +01:00
commit 02e8e9c3ea
5 changed files with 25 additions and 25 deletions

View file

@ -413,10 +413,10 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
LocalError(a.info, errCannotEvalXBecauseIncompletelyDefined,
"sizeof")
result = nil
elif a.typ.kind in {tyArray, tyObject, tyTuple}:
result = nil
elif skipTypes(a.typ, abstractInst).kind in {tyArray,tyObject,tyTuple}:
result = nil
# XXX: size computation for complex types is still wrong
else:
else:
result = newIntNodeT(getSize(a.typ), n)
of mLow:
result = newIntNodeT(firstOrd(n.sons[1].typ), n)