* fixed the handling of Ofs(x) typed constants on i8086; previously, they would

sometimes produce a far pointer constant (depending on the memory model and
  the type of 'x'), which would accidentally work for single constants, but will
  fail for consts, which are a part of a record or an array. This fixes e.g.
  const c:array[0..1] of word=(Ofs(a),Ofs(b)); in all memory models

git-svn-id: trunk@38121 -
This commit is contained in:
nickysn 2018-02-05 16:12:20 +00:00
parent 614755d799
commit fe7fb70e2c

View File

@ -110,12 +110,12 @@ uses
if po_abstractmethod in pd.procoptions then
Message(type_e_cant_take_address_of_abstract_method)
else
ftcb.emit_tai(Tai_const.Createname(pd.mangledname,0),u16inttype);
ftcb.emit_tai(Tai_const.Createname_near(pd.mangledname,0),u16inttype);
end;
staticvarsym :
ftcb.emit_tai(Tai_const.Createname(tstaticvarsym(srsym).mangledname,0),u16inttype);
ftcb.emit_tai(Tai_const.Createname_near(tstaticvarsym(srsym).mangledname,0),u16inttype);
labelsym :
ftcb.emit_tai(Tai_const.Createname(tlabelsym(srsym).mangledname,0),u16inttype);
ftcb.emit_tai(Tai_const.Createname_near(tlabelsym(srsym).mangledname,0),u16inttype);
else
Message(type_e_variable_id_expected);
end;