nested try blocks with exit gives Error: Internal error
Original Reporter info from Mantis: dhawk
-
Reporter name: David Hawk
Original Reporter info from Mantis: dhawk
- Reporter name: David Hawk
Description:
I have a procedure exit statement in try/finally block within the exception handler of a try/except block. Compiling it gives "Internal Error 200309201". See greatly simplified source in "Additional Information" below.
In my larger program I get an undefined symbol error .Lj9137. The code listing shows the following for the EXIT instruction:
# [3070] EXIT
movq %rsp,%rcx
leaq .Lj9137(%rip),%rdx
call _FPC_local_unwind
jmp .Lj9181
and .Lj9137 is nowhere to be found.
This code has worked in earlier versions of Lazarus (1.2?) and also works in Delphi (various versions).
Thanks in advance for looking into this.
Steps to reproduce:
I have a fresh install of Lazarus 1.8 on Windows 10 64-bit. I created a new project with all defaults and used the source below as the .lpr file. Building the project produced the "internal error".
In my larger program I get an "undefined symbol error". If need be I can send you the entire program, but I think this simplified fragment should get you to the problem.
Additional information:
program undefined_symbol_bug;
uses SysUtils;
procedure p;
begin
try
except
on e: Exception do
try
EXIT
finally
end
end
end;
begin
end.
Mantis conversion info:
- Mantis ID: 32913
- OS: windows
- OS Build: 10 64 bit
- Build: current recommended download
- Platform: windows
- Version: 3.0.4
- Monitored by: » Cyrax (Cyrax), » @zeljan1 (Zeljan Rikalo)
- Target version: 3.2.0