[Ada] Remove references to non-existing E_Protected_Object
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 27 May 2020 15:41:40 +0000 (17:41 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 10 Jul 2020 09:16:20 +0000 (05:16 -0400)
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.

gcc/ada/einfo.ads
gcc/ada/lib-xref.ads
gcc/ada/sem_ch3.adb
gcc/ada/sem_util.adb

index 7bb1f16..abb7cba 100644 (file)
@@ -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).
index cb1e57c..79dd57b 100644 (file)
@@ -514,7 +514,6 @@ package Lib.Xref is
 
       E_Package_Body                               => ' ',
       E_Protected_Body                             => ' ',
-      E_Protected_Object                           => ' ',
       E_Subprogram_Body                            => ' ',
       E_Task_Body                                  => ' ');
 
index 3907272..b964301 100644 (file)
@@ -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);
index 6c2a499..b70f2c8 100644 (file)
@@ -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.