mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 13:50:29 +02:00
+ write proper rtti for large sets, resolves #12788
git-svn-id: trunk@12371 -
This commit is contained in:
parent
6dd66f09b9
commit
e213be26fd
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8654,6 +8654,7 @@ tests/webtbs/tw12614.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw12685.pp svneol=native#text/plain
|
tests/webtbs/tw12685.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1269.pp svneol=native#text/plain
|
tests/webtbs/tw1269.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1275.pp svneol=native#text/plain
|
tests/webtbs/tw1275.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw12788.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1279.pp svneol=native#text/plain
|
tests/webtbs/tw1279.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1283.pp svneol=native#text/plain
|
tests/webtbs/tw1283.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1284.pp svneol=native#text/plain
|
tests/webtbs/tw1284.pp svneol=native#text/plain
|
||||||
|
@ -535,6 +535,8 @@ implementation
|
|||||||
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otUWord));
|
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otUWord));
|
||||||
4:
|
4:
|
||||||
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otULong));
|
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otULong));
|
||||||
|
else
|
||||||
|
current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(otUByte));
|
||||||
end;
|
end;
|
||||||
if (tf_requires_proper_alignment in target_info.flags) then
|
if (tf_requires_proper_alignment in target_info.flags) then
|
||||||
current_asmdata.asmlists[al_rtti].concat(cai_align.Create(sizeof(TConstPtrUInt)));
|
current_asmdata.asmlists[al_rtti].concat(cai_align.Create(sizeof(TConstPtrUInt)));
|
||||||
|
@ -64,12 +64,14 @@ const
|
|||||||
tkUString = 24;
|
tkUString = 24;
|
||||||
tkUChar = 25;
|
tkUChar = 25;
|
||||||
|
|
||||||
otSByte = 0;
|
otSByte = 0;
|
||||||
otUByte = 1;
|
otUByte = 1;
|
||||||
otSWord = 2;
|
otSWord = 2;
|
||||||
otUWord = 3;
|
otUWord = 3;
|
||||||
otSLong = 4;
|
otSLong = 4;
|
||||||
otULong = 5;
|
otULong = 5;
|
||||||
|
otSLongLong = 6;
|
||||||
|
otULongLong = 7;
|
||||||
|
|
||||||
ftSingle = 0;
|
ftSingle = 0;
|
||||||
ftDouble = 1;
|
ftDouble = 1;
|
||||||
|
33
tests/webtbs/tw12788.pp
Normal file
33
tests/webtbs/tw12788.pp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{$packset 1}
|
||||||
|
program t;
|
||||||
|
{$mode objfpc}{$h+}
|
||||||
|
|
||||||
|
uses typinfo;
|
||||||
|
|
||||||
|
type
|
||||||
|
tsmall = 0..11;
|
||||||
|
tsmallset = set of tsmall;
|
||||||
|
|
||||||
|
tbig = 25..200;
|
||||||
|
tbigset_ = set of tbig;
|
||||||
|
|
||||||
|
var
|
||||||
|
ti: PTypeInfo;
|
||||||
|
tdata: PTypeData;
|
||||||
|
begin
|
||||||
|
ti := typeinfo(tsmallset);
|
||||||
|
tdata := GetTypeData(ti);
|
||||||
|
writeln(ord(tdata^.OrdType));
|
||||||
|
if tdata^.CompType = typeinfo(tsmall) then
|
||||||
|
writeln('small ok')
|
||||||
|
else
|
||||||
|
halt(1);
|
||||||
|
|
||||||
|
ti := typeinfo(tbigset_);
|
||||||
|
tdata := GetTypeData(ti);
|
||||||
|
writeln(ord(tdata^.OrdType));
|
||||||
|
if tdata^.CompType = typeinfo(tbig) then
|
||||||
|
writeln('big ok')
|
||||||
|
else
|
||||||
|
halt(2);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user