mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:39:26 +02:00
* fix loading of enum subranges from ppu
git-svn-id: trunk@535 -
This commit is contained in:
parent
26c69e89dc
commit
627a3b53e8
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -6101,6 +6101,7 @@ tests/webtbs/tw4078.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4089.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4093.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4115.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4140.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||
@ -6136,6 +6137,7 @@ tests/webtbs/uw3356.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3429.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3474a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3474b.pp svneol=native#text/plain
|
||||
tests/webtbs/uw4140.pp svneol=native#text/plain
|
||||
utils/Makefile svneol=native#text/plain
|
||||
utils/Makefile.fpc svneol=native#text/plain
|
||||
utils/README -text
|
||||
|
@ -684,6 +684,7 @@ interface
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
procedure buildderef;override;
|
||||
procedure deref;override;
|
||||
procedure derefimpl;override;
|
||||
function gettypename:string;override;
|
||||
function is_publishable : boolean;override;
|
||||
procedure calcsavesize;
|
||||
@ -1785,6 +1786,18 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure tenumdef.derefimpl;
|
||||
begin
|
||||
if assigned(basedef) and
|
||||
(firstenum=nil) then
|
||||
begin
|
||||
firstenum:=basedef.firstenum;
|
||||
while assigned(firstenum) and (tenumsym(firstenum).value<>minval) do
|
||||
firstenum:=tenumsym(firstenum).nextenum;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
destructor tenumdef.destroy;
|
||||
begin
|
||||
inherited destroy;
|
||||
|
18
tests/webtbs/tw4140.pp
Executable file
18
tests/webtbs/tw4140.pp
Executable file
@ -0,0 +1,18 @@
|
||||
{ %recompile }
|
||||
unit tw4140;
|
||||
|
||||
interface
|
||||
|
||||
implementation
|
||||
|
||||
uses uw4140;
|
||||
|
||||
procedure Foo;
|
||||
var Enum: TMySubEnum;
|
||||
begin
|
||||
{ Any of two lines below causes "Internal error 309993" }
|
||||
Writeln(Ord(Low(TMySubEnum)));
|
||||
Writeln(Ord(Low(Enum)));
|
||||
end;
|
||||
|
||||
end.
|
11
tests/webtbs/uw4140.pp
Executable file
11
tests/webtbs/uw4140.pp
Executable file
@ -0,0 +1,11 @@
|
||||
unit uw4140;
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
TMyEnum = (meOne, meTwo, meThree);
|
||||
TMySubEnum = meOne .. meTwo;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user