* fixed parsing of "var x: <type> absolute <value>;" on 64 bit platforms

(tests/tbs/tb0350)

git-svn-id: trunk@12715 -
This commit is contained in:
Jonas Maebe 2009-02-08 09:00:49 +00:00
parent 7bb670800d
commit 9b790edd4f

View File

@ -1017,10 +1017,16 @@ implementation
abssym:=tabsolutevarsym.create(vs.realname,vs.vardef);
abssym.fileinfo:=vs.fileinfo;
abssym.abstyp:=toaddr;
{$ifndef cpu64bitaddr}
{ on 64 bit systems, abssym.addroffset is a qword and hence this
test is useless (value is a 64 bit entity) and will always fail
for positive values (since int64(high(abssym.addroffset))=-1
}
if (Tordconstnode(pt).value<int64(low(abssym.addroffset))) or
(Tordconstnode(pt).value>int64(high(abssym.addroffset))) then
message(parser_e_range_check_error)
else
{$endif}
abssym.addroffset:=Tordconstnode(pt).value.svalue;
{$ifdef i386}
abssym.absseg:=false;