From d96a20bf2ef939c0dd9d2bb32c59267842279c29 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 6 Sep 2022 23:20:47 +0200 Subject: [PATCH] ada: Remove unneeded code in handling formal type defaults Unneeded code found while experimenting with improved detection of unreferenced objects. gcc/ada/ * sem_ch12.adb (Validate_Formal_Type_Default): Remove call to Collect_Interfaces, which had no effect apart from populating a list that was not used; fix style. --- gcc/ada/sem_ch12.adb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 2b7833dfdcd..ca0f4913e36 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -17303,13 +17303,11 @@ package body Sem_Ch12 is else declare - Act_Iface_List : Elist_Id; - Iface : Node_Id; - Iface_Ent : Entity_Id; + Iface : Node_Id; + Iface_Ent : Entity_Id; begin Iface := First (Abstract_Interface_List (Formal)); - Collect_Interfaces (Def_Sub, Act_Iface_List); while Present (Iface) loop Iface_Ent := Entity (Iface); -- 2.11.4.GIT