diff options
-rw-r--r-- | compiler/arm/narmmat.pas | 15 | ||||
-rw-r--r-- | tests/webtbs/tw23849.pp | 23 |
2 files changed, 7 insertions, 31 deletions
diff --git a/compiler/arm/narmmat.pas b/compiler/arm/narmmat.pas index 7c7f3063eb..3ed4a2fb3e 100644 --- a/compiler/arm/narmmat.pas +++ b/compiler/arm/narmmat.pas @@ -64,14 +64,13 @@ implementation var power : longint; begin - if not(cs_check_overflow in current_settings.localswitches) and - (right.nodetype=ordconstn) and - (nodetype=divn) and - (ispowerof2(tordconstnode(right).value,power) or - (tordconstnode(right).value=1) or - (tordconstnode(right).value=int64(-1)) - ) and - not(is_64bitint(resultdef)) then + if (right.nodetype=ordconstn) and + (nodetype=divn) and + (ispowerof2(tordconstnode(right).value,power) or + (tordconstnode(right).value=1) or + (tordconstnode(right).value=int64(-1)) + ) and + not(is_64bitint(resultdef)) then result:=nil else result:=inherited first_moddivint; diff --git a/tests/webtbs/tw23849.pp b/tests/webtbs/tw23849.pp deleted file mode 100644 index 5eb70869f9..0000000000 --- a/tests/webtbs/tw23849.pp +++ /dev/null @@ -1,23 +0,0 @@ -{$mode delphi} -{$q+} - -function F(N: integer) : integer; -var NN : integer; -begin - NN := N; - if NN < 0 then NN := 0 - NN; - result := NN; -end; - -procedure Crash; cdecl; -var - N, M : integer; -begin - N := -10; - M := F(N) div 4; -end; - -begin - Crash; -end. - |