X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gcc%2Fada%2Fsem_ch12.adb;h=ab68f7203383f43059a60cfa15f9d2e2297c57d3;hb=42b91d9a746aa1736de6876a34b4d817591bffb1;hp=f9df62436148b256ae6e3072731fa22848fd3b94;hpb=dcb1cad0e0747501e9d54eeec6b0481eb87d23c5;p=gcc.git diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index f9df6243614..ab68f720338 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -8802,7 +8802,7 @@ package body Sem_Ch12 is while not Is_List_Member (P1) or else not Is_List_Member (P2) - or else List_Containing (P1) /= List_Containing (P2) + or else not In_Same_List (P1, P2) loop P1 := True_Parent (P1); P2 := True_Parent (P2); @@ -9092,8 +9092,7 @@ package body Sem_Ch12 is -- after that of Parent_Inst. This relation is established by -- comparing the Slocs of Parent_Inst freeze node and Inst. - elsif List_Containing (Get_Unit_Instantiation_Node (Par)) = - List_Containing (Inst_Node) + elsif In_Same_List (Get_Unit_Instantiation_Node (Par), Inst_Node) and then Sloc (Freeze_Node (Par)) <= Sloc (Inst_Node) then Insert_Freeze_Node_For_Instance (Inst_Node, F_Node); @@ -9989,8 +9988,7 @@ package body Sem_Ch12 is -- the enclosing package, insert the freeze node after -- the body. - elsif List_Containing (Freeze_Node (Par)) = - List_Containing (Parent (N)) + elsif In_Same_List (Freeze_Node (Par), Parent (N)) and then Sloc (Freeze_Node (Par)) < Sloc (Parent (N)) then Insert_Freeze_Node_For_Instance