From: Ronan Desplanques <[email protected]>
The code this patch removes is never executed on any of the available
test suites. The patch that introduced it mentions that it fixes a test
in particular, but that test passes anyway today.
gcc/ada/ChangeLog:
* sem_ch8.adb (Premature_Usage): Remove dead code.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch8.adb | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 65d30967ae0..fe9328833df 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -9922,28 +9922,8 @@ package body Sem_Ch8 is
procedure Premature_Usage (N : Node_Id) is
Kind : constant Node_Kind := Nkind (Parent (Entity (N)));
- E : Entity_Id := Entity (N);
begin
- -- Within an instance, the analysis of the actual for a formal object
- -- does not see the name of the object itself. This is significant only
- -- if the object is an aggregate, where its analysis does not do any
- -- name resolution on component associations. (see 4717-008). In such a
- -- case, look for the visible homonym on the chain.
-
- if In_Instance and then Present (Homonym (E)) then
- E := Homonym (E);
- while Present (E) and then not In_Open_Scopes (Scope (E)) loop
- E := Homonym (E);
- end loop;
-
- if Present (E) then
- Set_Entity (N, E);
- Set_Etype (N, Etype (E));
- return;
- end if;
- end if;
-
case Kind is
when N_Component_Declaration =>
Error_Msg_N
--
2.43.0