mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-20 19:29:36 +01:00
+ ensure the callee size paraloc info is available, when setting up a local var
or parameter in RAUtils.TOperand.SetupVar(). This fixes a compiler crash, when a parent parameter or local var is accessed (in certain ways) inside a nested inline asm routine. git-svn-id: trunk@38236 -
This commit is contained in:
parent
0baf3f69d8
commit
b9e41330d4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12510,6 +12510,7 @@ tests/test/tasm18e.pp svneol=native#text/plain
|
||||
tests/test/tasm18f.pp svneol=native#text/plain
|
||||
tests/test/tasm18g.pp svneol=native#text/plain
|
||||
tests/test/tasm18h.pp svneol=native#text/plain
|
||||
tests/test/tasm19.pp svneol=native#text/plain
|
||||
tests/test/tasm2.inc svneol=native#text/plain
|
||||
tests/test/tasm2.pp svneol=native#text/plain
|
||||
tests/test/tasm2a.pp svneol=native#text/plain
|
||||
|
||||
@ -816,6 +816,7 @@ var
|
||||
(e.g. var tralala: word absolute moo[5]; ) }
|
||||
absoffset: asizeint=0;
|
||||
harrdef: tarraydef;
|
||||
tmpprocinfo: tprocinfo;
|
||||
Begin
|
||||
SetupVar:=false;
|
||||
asmsearchsym(s,sym,srsymtable);
|
||||
@ -928,6 +929,17 @@ Begin
|
||||
paravarsym,
|
||||
localvarsym :
|
||||
begin
|
||||
tmpprocinfo:=current_procinfo;
|
||||
while assigned(tmpprocinfo) do
|
||||
begin
|
||||
if (sym.owner=tmpprocinfo.procdef.localst) or
|
||||
(sym.owner=tmpprocinfo.procdef.parast) then
|
||||
begin
|
||||
tmpprocinfo.procdef.init_paraloc_info(calleeside);
|
||||
break;
|
||||
end;
|
||||
tmpprocinfo:=tmpprocinfo.parent;
|
||||
end;
|
||||
if opr.typ=OPR_REFERENCE then
|
||||
begin
|
||||
indexreg:=opr.ref.base;
|
||||
|
||||
21
tests/test/tasm19.pp
Normal file
21
tests/test/tasm19.pp
Normal file
@ -0,0 +1,21 @@
|
||||
{ %NORUN }
|
||||
{ %CPU=i8086 }
|
||||
|
||||
{$IFDEF FPC}
|
||||
{$MODE TP}
|
||||
{$ENDIF}
|
||||
program tasm19;
|
||||
|
||||
procedure subpcrash(x: word);
|
||||
|
||||
procedure subtocrash; assembler;
|
||||
asm
|
||||
{ compiler crash here... }
|
||||
mov ax,[si+offset x]
|
||||
end;
|
||||
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user