mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:09:42 +02:00
* don't overwrite register variables when evaluating <=/>= expressions with
smallsets (left is overwritten by an "and", so it cannot be const; mantis #18013) git-svn-id: trunk@16400 -
This commit is contained in:
parent
a1d8ad7a27
commit
44178f41b6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10755,6 +10755,7 @@ tests/webtbs/tw1792a.pp svneol=native#text/plain
|
||||
tests/webtbs/tw17945.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw17950.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw1798.pp svneol=native#text/plain
|
||||
tests/webtbs/tw18013.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1820.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1825.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1850.pp svneol=native#text/plain
|
||||
|
@ -451,7 +451,7 @@ unit nx86add;
|
||||
if (not(nf_swapped in flags) and (nodetype = lten)) or
|
||||
((nf_swapped in flags) and (nodetype = gten)) then
|
||||
swapleftright;
|
||||
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,true);
|
||||
location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,false);
|
||||
emit_op_right_left(A_AND,opsize);
|
||||
op:=A_CMP;
|
||||
{ warning: ugly hack, we need a JE so change the node to equaln }
|
||||
|
15
tests/webtbs/tw18013.pp
Normal file
15
tests/webtbs/tw18013.pp
Normal file
@ -0,0 +1,15 @@
|
||||
program test;
|
||||
|
||||
var
|
||||
wa, ws : set of 1..9;
|
||||
begin
|
||||
wa := [1..2];
|
||||
ws := [1..3];
|
||||
if (wa <= ws) and (wa <> ws) then writeln('True') else writeln('False');
|
||||
if (wa <= ws) then
|
||||
if (wa <> ws) then writeln('True') else writeln('False');
|
||||
if (wa <= ws) then writeln('True') else writeln('False');
|
||||
if (wa <> ws) then writeln('True') else writeln('False');
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user