* if the debug info of a parent def is considered as queued then ensure that it is indeed queued (if it should already be in the list then the duplicate entry would have the state written if it's checked and thus ignored)

+ added test

git-svn-id: trunk@37969 -
This commit is contained in:
svenbarth 2018-01-14 16:46:10 +00:00
parent ff44f51292
commit 22932493b9
4 changed files with 74 additions and 1 deletions

2
.gitattributes vendored
View File

@ -11478,6 +11478,7 @@ tests/tbs/tb0631.pp svneol=native#text/pascal
tests/tbs/tb0632.pp svneol=native#text/pascal
tests/tbs/tb0633.pp svneol=native#text/pascal
tests/tbs/tb0634.pp svneol=native#text/pascal
tests/tbs/tb0635.pp svneol=native#text/pascal
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/tb610.pp svneol=native#text/pascal
tests/tbs/tb613.pp svneol=native#text/plain
@ -11518,6 +11519,7 @@ tests/tbs/ub0489b.pp svneol=native#text/plain
tests/tbs/ub0506.pp svneol=native#text/plain
tests/tbs/ub0569.pp svneol=native#text/pascal
tests/tbs/ub0629.pp svneol=native#text/pascal
tests/tbs/ub0635.pp svneol=native#text/pascal
tests/test/README.txt svneol=native#text/plain
tests/test/alglib/t_testconvunit.pp svneol=native#text/plain
tests/test/alglib/t_testcorrunit.pp svneol=native#text/plain

View File

@ -326,7 +326,11 @@ implementation
(tobjectdef(def).childof.dbg_state=dbg_state_written) then
appenddef(list,def)
else if tobjectdef(def).childof.dbg_state=dbg_state_queued then
deftowritelist.add(def)
begin
{ ensure that the parent is indeed queued }
deftowritelist.add(tobjectdef(def).childof);
deftowritelist.add(def);
end
else if tobjectdef(def).childof.dbg_state=dbg_state_used then
{ comes somewhere after the current def in the looplist
and will be written at that point, so we will have to

23
tests/tbs/tb0635.pp Normal file
View File

@ -0,0 +1,23 @@
{ %OPT=-gs }
unit tb0635;
{$mode objfpc}
INTERFACE
uses ub0635;
type
TAnalyser = Class (TNode)
end;
TStat = Class (TAnalyser) //eine Eingangsgruppe, kein Ausgang
end;
//**************************************************************************************
IMPLEMENTATION
begin
end.

44
tests/tbs/ub0635.pp Normal file
View File

@ -0,0 +1,44 @@
unit ub0635;
{$mode objfpc}
INTERFACE
type
TNode = Class;
TSortableNode = Class;
TAdminNode = Class;
TGuardNode = Class;
TBaseSystem = Class
strict private
fEvList : TSortableNode;
fGuard : TGuardNode;
end;
TNode = Class
fOwner : TBaseSystem;
end;
TSortableNode = Class (TNode)
end;
TAnalyser = Class (TNode)
end;
TStat = Class (TAnalyser)
end;
TAdminNode = Class (TSortableNode)
end;
TGuardNode = Class (TAdminNode)
end;
IMPLEMENTATION
begin
end.