diff options
author | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:50:53 +0000 |
---|---|---|
committer | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:50:53 +0000 |
commit | fd6a082b1ce248125b78ca99a6b41f2103a82993 (patch) | |
tree | 27f1dfe36560a8fa412cd69fc427562009b947a8 | |
parent | adf6fe1a1c2d65db849fb1938d570bc5c6c4504b (diff) | |
download | fpc-fd6a082b1ce248125b78ca99a6b41f2103a82993.tar.gz |
Avoid invalid typecast if hp is not an instruction
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49273 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/arm/rgcpu.pas | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/arm/rgcpu.pas b/compiler/arm/rgcpu.pas index 65a7fda72f..7fa6c16e2d 100644 --- a/compiler/arm/rgcpu.pas +++ b/compiler/arm/rgcpu.pas @@ -400,10 +400,11 @@ unit rgcpu; level := 0; while assigned(hp) do begin - if IsIT(taicpu(hp).opcode) then - break - else if hp.typ=ait_instruction then - inc(level); + if hp.typ=ait_instruction then + if IsIT(taicpu(hp).opcode) then + break + else + inc(level); hp:=tai(hp.Previous); end; |