[Ada] Do not expect task discriminants in Global and Depends contracts
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 31 Mar 2020 12:49:14 +0000 (14:49 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 15 Jun 2020 08:04:30 +0000 (04:04 -0400)
2020-06-15  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_prag.adb (Analyze_Depends_In_Decl_Part,
Analyze_Global_In_Decl_Part): Do not install task discriminants
for analysis of the Global/Depends contracts.

gcc/ada/sem_prag.adb

index 2b63617b42c23d9fa71bf31ff96920aacf0b2dc0..a32bb9bf241f67aab9f4fd822c9245c0ed85207e 100644 (file)
@@ -2001,9 +2001,7 @@ package body Sem_Prag is
                Push_Scope (Spec_Id);
 
                if Ekind (Spec_Id) = E_Task_Type then
-                  if Has_Discriminants (Spec_Id) then
-                     Install_Discriminants (Spec_Id);
-                  end if;
+                  null;
 
                elsif Is_Generic_Subprogram (Spec_Id) then
                   Install_Generic_Formals (Spec_Id);
@@ -2791,9 +2789,7 @@ package body Sem_Prag is
             Push_Scope (Spec_Id);
 
             if Ekind (Spec_Id) = E_Task_Type then
-               if Has_Discriminants (Spec_Id) then
-                  Install_Discriminants (Spec_Id);
-               end if;
+               null;
 
             elsif Is_Generic_Subprogram (Spec_Id) then
                Install_Generic_Formals (Spec_Id);