* do not throw an internal error on illegal assembler expressions, resolves

git-svn-id: trunk@46499 -
This commit is contained in:
florian 2020-08-19 21:09:44 +00:00
parent e200fde888
commit 120825d1d6
3 changed files with 22 additions and 16 deletions
.gitattributes
compiler/x86
tests/webtbf

1
.gitattributes vendored
View File

@ -16556,6 +16556,7 @@ tests/webtbf/tw37272b.pp svneol=native#text/pascal
tests/webtbf/tw37303.pp -text svneol=native#text/pascal
tests/webtbf/tw3738.pp svneol=native#text/plain
tests/webtbf/tw3740.pp svneol=native#text/plain
tests/webtbf/tw37459.pp svneol=native#text/pascal
tests/webtbf/tw37460.pp svneol=native#text/pascal
tests/webtbf/tw37462.pp svneol=native#text/pascal
tests/webtbf/tw37475.pp svneol=native#text/pascal

View File

@ -720,22 +720,23 @@ Implementation
if (actasmtoken=AS_PLUS) then
begin
l:=BuildConstExpression(true,false);
case oper.opr.typ of
OPR_CONSTANT :
inc(oper.opr.val,l);
OPR_LOCAL :
begin
inc(oper.opr.localsymofs,l);
inc(oper.opr.localconstoffset, l);
end;
OPR_REFERENCE :
begin
inc(oper.opr.ref.offset,l);
inc(oper.opr.constoffset, l);
end;
else
internalerror(200309202);
end;
if errorcount=0 then
case oper.opr.typ of
OPR_CONSTANT :
inc(oper.opr.val,l);
OPR_LOCAL :
begin
inc(oper.opr.localsymofs,l);
inc(oper.opr.localconstoffset, l);
end;
OPR_REFERENCE :
begin
inc(oper.opr.ref.offset,l);
inc(oper.opr.constoffset, l);
end;
else
internalerror(200309202);
end;
end;
end;
end;

4
tests/webtbf/tw37459.pp Normal file
View File

@ -0,0 +1,4 @@
{ %fail }
begin
asm test ptr + ,
// end.