mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 10:39:39 +02:00
git-svn-id: trunk@37390 -
This commit is contained in:
parent
58454f555a
commit
cc44328109
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -15788,6 +15788,7 @@ tests/webtbs/tw3207.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw3210.pp svneol=native#text/plain
|
tests/webtbs/tw3210.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw32108.pp svneol=native#text/pascal
|
tests/webtbs/tw32108.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw32111.pp svneol=native#text/pascal
|
tests/webtbs/tw32111.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw32115.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw32118.pp svneol=native#text/pascal
|
tests/webtbs/tw32118.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3212.pp svneol=native#text/plain
|
tests/webtbs/tw3212.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3214.pp svneol=native#text/plain
|
tests/webtbs/tw3214.pp svneol=native#text/plain
|
||||||
|
@ -1003,7 +1003,7 @@ implementation
|
|||||||
var
|
var
|
||||||
oldflowcontrol: tflowcontrol;
|
oldflowcontrol: tflowcontrol;
|
||||||
i : longint;
|
i : longint;
|
||||||
distv,dist,
|
dist,distv,
|
||||||
lv,hv,
|
lv,hv,
|
||||||
max_label: tconstexprint;
|
max_label: tconstexprint;
|
||||||
labelcnt : tcgint;
|
labelcnt : tcgint;
|
||||||
@ -1081,14 +1081,9 @@ implementation
|
|||||||
{ can we omit the range check of the jump table ? }
|
{ can we omit the range check of the jump table ? }
|
||||||
getrange(left.resultdef,lv,hv);
|
getrange(left.resultdef,lv,hv);
|
||||||
jumptable_no_range:=(lv=min_label) and (hv=max_label);
|
jumptable_no_range:=(lv=min_label) and (hv=max_label);
|
||||||
{ hack a little bit, because the range can be greater }
|
|
||||||
{ than the positive range of a aint }
|
|
||||||
|
|
||||||
if (min_label<0) and (max_label>0) then
|
distv:=max_label-min_label;
|
||||||
distv:=max_label+min_label
|
if distv>=0 then
|
||||||
else
|
|
||||||
distv:=max_label-min_label;
|
|
||||||
if (distv>=0) then
|
|
||||||
dist:=distv.uvalue
|
dist:=distv.uvalue
|
||||||
else
|
else
|
||||||
dist:=-distv.svalue;
|
dist:=-distv.svalue;
|
||||||
|
26
tests/webtbs/tw32115.pp
Normal file
26
tests/webtbs/tw32115.pp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{$mode objfpc}
|
||||||
|
program Project1;
|
||||||
|
|
||||||
|
function CalcSmth(const AValue: Integer): Integer;
|
||||||
|
begin
|
||||||
|
case AValue of
|
||||||
|
-9999999..-1000000: Result := 2;
|
||||||
|
-999999..-100000: Result := 7;
|
||||||
|
-99999..-10000: Result := 5;
|
||||||
|
-9999..-1000: Result := 6;
|
||||||
|
-999..-100: Result := 3;
|
||||||
|
-99..-10: Result := 2;
|
||||||
|
-9..-1: Result := 3;
|
||||||
|
0..9: Result := 5;
|
||||||
|
10..99: Result := 2;
|
||||||
|
100..999: Result := 3;
|
||||||
|
1000..9999: Result := 1;
|
||||||
|
10000..99999: Result := 5;
|
||||||
|
100000..999999: Result := 8;
|
||||||
|
1000000..9999999: Result := 6;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
CalcSmth(0);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user