diff --git a/.gitattributes b/.gitattributes index 386a8450d7..0aa1474d3e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/compiler/dbgbase.pas b/compiler/dbgbase.pas index 0172e3b576..33f8c2bbde 100644 --- a/compiler/dbgbase.pas +++ b/compiler/dbgbase.pas @@ -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 diff --git a/tests/tbs/tb0635.pp b/tests/tbs/tb0635.pp new file mode 100644 index 0000000000..d3752550c8 --- /dev/null +++ b/tests/tbs/tb0635.pp @@ -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. + diff --git a/tests/tbs/ub0635.pp b/tests/tbs/ub0635.pp new file mode 100644 index 0000000000..09beaca9f9 --- /dev/null +++ b/tests/tbs/ub0635.pp @@ -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. +