From: Ronan Desplanques <[email protected]>
This patch removes a special exemption in Enter_Name. That exemption was
preceded by a comment which described what situations it was supposed to
be required for, but it was unnecessary even in those situations.
gcc/ada/ChangeLog:
* sem_util.adb (Enter_Name): Remove special handling.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 523aff33f95..59bf060ee74 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -8082,17 +8082,7 @@ package body Sem_Util is
-- If we fall through, declaration is OK, at least OK enough to continue
- -- If Def_Id is a discriminant or a record component we are in the midst
- -- of inheriting components in a derived record definition. Preserve
- -- their Ekind and Etype.
-
- if Ekind (Def_Id) in E_Discriminant | E_Component then
- null;
-
- elsif Present (Etype (Def_Id)) then
- null;
-
- else
+ if No (Etype (Def_Id)) then
Set_Etype (Def_Id, Any_Type); -- avoid cascaded errors
end if;
--
2.43.0