From: Piotr Trojanek Date: Wed, 27 May 2020 15:41:40 +0000 (+0200) Subject: [Ada] Remove references to non-existing E_Protected_Object X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3b4ce9b912c243c0203b4d022d0b7ad7ba744ce;p=gcc.git [Ada] Remove references to non-existing E_Protected_Object gcc/ada/ * einfo.ads (E_Protected_Object): Enumeration literal removed. * lib-xref.ads (Xref_Entity_Letters): Remove reference to removed literal. * sem_ch3.adb (Check_Completion): Likewise. * sem_util.adb (Has_Enabled_Property): Likewise. --- diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 7bb1f16d98d..abb7cbae1ac 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -5214,10 +5214,6 @@ package Einfo is -- there are some attributes that are significant for the body entity. -- For example, collection of exception handlers. - E_Protected_Object, - -- A protected object, created by an object declaration that declares - -- an object of a protected type. - E_Protected_Body, -- A protected body. This entity serves almost no function, since all -- semantic analysis uses the protected entity (E_Protected_Type). diff --git a/gcc/ada/lib-xref.ads b/gcc/ada/lib-xref.ads index cb1e57ccaf3..79dd57b1daa 100644 --- a/gcc/ada/lib-xref.ads +++ b/gcc/ada/lib-xref.ads @@ -514,7 +514,6 @@ package Lib.Xref is E_Package_Body => ' ', E_Protected_Body => ' ', - E_Protected_Object => ' ', E_Subprogram_Body => ' ', E_Task_Body => ' '); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 3907272c31a..b964301c423 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -11676,9 +11676,8 @@ package body Sem_Ch3 is end if; elsif Is_Entry (E) then - if not Has_Completion (E) and then - (Ekind (Scope (E)) = E_Protected_Object - or else Ekind (Scope (E)) = E_Protected_Type) + if not Has_Completion (E) + and then Ekind (Scope (E)) = E_Protected_Type then Post_Error; end if; @@ -11722,11 +11721,6 @@ package body Sem_Ch3 is then Post_Error; - elsif Ekind (E) = E_Protected_Object - and then not Has_Completion (Etype (E)) - then - Post_Error; - elsif Ekind (E) = E_Record_Type then if Is_Tagged_Type (E) then Check_Abstract_Overriding (E); diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 6c2a4992cf6..b70f2c8fcbb 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -11541,14 +11541,6 @@ package body Sem_Util is return Type_Or_Variable_Has_Enabled_Property (Item_Id => First_Subtype (Item_Id)); - -- By default, protected objects only have the properties Async_Readers - -- and Async_Writers. If they have Part_Of components, they also inherit - -- their properties Effective_Reads and Effective_Writes - -- (SPARK RM 7.1.2(16)). - - elsif Ekind (Item_Id) = E_Protected_Object then - return Protected_Type_Or_Variable_Has_Enabled_Property; - -- Otherwise a property is enabled when the related item is effectively -- volatile.