mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-06 12:29:11 +01:00
* when deciding about the case code generation in case of size optimization, the number of labels is relevant, not the covered range, resolves #34818
git-svn-id: trunk@40851 -
This commit is contained in:
parent
dd072ce76b
commit
644c47e121
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -16474,6 +16474,7 @@ tests/webtbs/tw3474.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw3477.pp svneol=native#text/plain
|
tests/webtbs/tw3477.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3478.pp svneol=native#text/plain
|
tests/webtbs/tw3478.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3479.pp svneol=native#text/plain
|
tests/webtbs/tw3479.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw34818.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw34848.pp svneol=native#text/pascal
|
tests/webtbs/tw34848.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3489.pp svneol=native#text/plain
|
tests/webtbs/tw3489.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3490.pp svneol=native#text/plain
|
tests/webtbs/tw3490.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -1259,7 +1259,7 @@ implementation
|
|||||||
(max_label<=high(aint)) and
|
(max_label<=high(aint)) and
|
||||||
not((labelcnt<=2) or
|
not((labelcnt<=2) or
|
||||||
(distv.svalue<0) or
|
(distv.svalue<0) or
|
||||||
(dist>3*TrueCount)) then
|
(dist>3*labelcnt)) then
|
||||||
begin
|
begin
|
||||||
{ if the labels less or more a continuum then }
|
{ if the labels less or more a continuum then }
|
||||||
genjumptable(labels,min_label.svalue,max_label.svalue);
|
genjumptable(labels,min_label.svalue,max_label.svalue);
|
||||||
|
|||||||
25
tests/webtbs/tw34818.pp
Normal file
25
tests/webtbs/tw34818.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ %OPT=-O1s }
|
||||||
|
program Project1;
|
||||||
|
|
||||||
|
var CharValue: cardinal;
|
||||||
|
begin
|
||||||
|
CharValue:=12;
|
||||||
|
case CharValue of
|
||||||
|
$00000000..$0000007f:begin
|
||||||
|
writeln('ok');
|
||||||
|
halt(0);
|
||||||
|
end;
|
||||||
|
$00000080..$000007ff:begin
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
$00000800..$0000ffff:begin
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
$00010000..$0010ffff:begin
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
$00200000..$03ffffff:begin
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user