From bf0b8503c9879aca93a4dfd05b41b6f9d3b68f9a Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 07:57:22 +0000 Subject: [PATCH] * don't internalerror in decstack() if the evaluation stack becomes corrupted in case -sr is used (-sr code cannot be compiled, and is only used for debugging; with -alr, the stack slot information is printed in the assembler file) git-svn-id: branches/jvmbackend@18410 - --- compiler/jvm/hlcgcpu.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/jvm/hlcgcpu.pas b/compiler/jvm/hlcgcpu.pas index 8350548f88..6f04a1d998 100644 --- a/compiler/jvm/hlcgcpu.pas +++ b/compiler/jvm/hlcgcpu.pas @@ -221,7 +221,8 @@ implementation if slots=0 then exit; dec(fevalstackheight,slots); - if (fevalstackheight<0) then + if (fevalstackheight<0) and + not(cs_no_regalloc in current_settings.globalswitches) then internalerror(2010120501); if cs_asm_regalloc in current_settings.globalswitches then list.concat(tai_comment.Create(strpnew(' freed '+tostr(slots)+', stack height = '+tostr(fevalstackheight))));