Re: [fpc-devel] Attn. Florian, r39759

2018-09-17 Thread Joao Schuler
Assuming: v=1; x=10; y=3 (v-x) < (y-x) == (1-10) < (3-10) == -9 < -7 == *true* (v>=x) and (v<=y) == (1>=10) and (1<=3) == false and true = *false* ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] Attn. Florian, r39759

2018-09-17 Thread Bart
Hi, > optimize (v>=x) and (v<=y) into (v-x)<(y-x) If the commit does what this says, it is incorrect for the case that x=v=y: (v>=x)=true, (v<=x)=true, (v-x)<(y-x) translates to (0<0) wich is false. See https://bugs.freepascal.org/view.php?id=34292 -- Bart