diff options
Diffstat (limited to 'gcc/ada/a-comutr.adb')
-rw-r--r-- | gcc/ada/a-comutr.adb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ada/a-comutr.adb b/gcc/ada/a-comutr.adb index f718eb8..b5132f9 100644 --- a/gcc/ada/a-comutr.adb +++ b/gcc/ada/a-comutr.adb @@ -2147,10 +2147,14 @@ package body Ada.Containers.Multiway_Trees is end if; if Target'Address = Source'Address then - if Position.Node = Before.Node - or else Position.Node.Next = Before.Node - then - return; + if Position.Node.Parent = Parent.Node then + if Position.Node = Before.Node then + return; + end if; + + if Position.Node.Next = Before.Node then + return; + end if; end if; if Target.Busy > 0 then @@ -2245,10 +2249,14 @@ package body Ada.Containers.Multiway_Trees is raise Constraint_Error with "Position cursor designates root"; end if; - if Position.Node = Before.Node - or else Position.Node.Next = Before.Node - then - return; + if Position.Node.Parent = Parent.Node then + if Position.Node = Before.Node then + return; + end if; + + if Position.Node.Next = Before.Node then + return; + end if; end if; if Container.Busy > 0 then |