[Ada] Do not expect Global or Depends on single protected objects
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 26 Mar 2020 19:31:21 +0000 (20:31 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 15 Jun 2020 08:04:29 +0000 (04:04 -0400)
2020-06-15  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* contracts.adb (Analyze_Object_Contract): Do not expect
Global/Depends on single protected units.

gcc/ada/contracts.adb

index 300bbf9..ae85d2c 100644 (file)
@@ -1067,10 +1067,10 @@ package body Contracts is
             Analyze_External_Property_In_Decl_Part (Prag, NC_Val);
          end if;
 
-         --  The anonymous object created for a single concurrent type carries
-         --  pragmas Depends and Globat of the type.
+         --  The anonymous object created for a single task type carries
+         --  pragmas Depends and Global of the type.
 
-         if Is_Single_Concurrent_Object (Obj_Id) then
+         if Is_Single_Task_Object (Obj_Id) then
 
             --  Analyze Global first, as Depends may mention items classified
             --  in the global categorization.