mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 20:46:04 +02:00
* fixed internalerror(2007120903) when using -Cfsse2 in case an unsigned
32 bit subrange type with high(subrange_type) <= high(longint) is converted to a float git-svn-id: trunk@13037 -
This commit is contained in:
parent
533f533868
commit
dbeb3e060f
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7240,6 +7240,7 @@ tests/tbs/tb0554.pp svneol=native#text/plain
|
||||
tests/tbs/tb0555.pp svneol=native#text/plain
|
||||
tests/tbs/tb0556.pp svneol=native#text/plain
|
||||
tests/tbs/tb0557.pp svneol=native#text/plain
|
||||
tests/tbs/tb0558.pp svneol=native#text/plain
|
||||
tests/tbs/tb205.pp svneol=native#text/plain
|
||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||
|
@ -262,10 +262,13 @@ implementation
|
||||
else
|
||||
internalerror(2007120902);
|
||||
end;
|
||||
case left.location.size of
|
||||
OS_S32:
|
||||
{ don't use left.location.size, because that one may be OS_32/OS_64
|
||||
if the lower bound of the orddef >= 0
|
||||
}
|
||||
case torddef(left.resultdef).ordtype of
|
||||
s32bit:
|
||||
opsize:=S_L;
|
||||
OS_S64:
|
||||
s64bit:
|
||||
opsize:=S_Q;
|
||||
else
|
||||
internalerror(2007120903);
|
||||
|
19
tests/tbs/tb0558.pp
Normal file
19
tests/tbs/tb0558.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{ %cpu=i386}
|
||||
{ %opt=-Cfsse2 }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
type
|
||||
TChartZPosition = 0..MaxInt;
|
||||
TDoublePoint = record x, y: double; end;
|
||||
|
||||
var
|
||||
d: double;
|
||||
z: TChartZPosition;
|
||||
begin
|
||||
d:=5.0;
|
||||
z:=3;
|
||||
d:=d-z;
|
||||
if (d<>2.0) then
|
||||
halt(1);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user