[Ada] Up-level addressing problems with private tasks and selective accept procs
authorGary Dismukes <dismukes@adacore.com>
Fri, 13 Dec 2019 09:03:40 +0000 (09:03 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Fri, 13 Dec 2019 09:03:40 +0000 (09:03 +0000)
2019-12-13  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

* sem_util.adb (Scope_Within): For the case of checking for a
task type procedure, check the Implementation_Base_Type of Curr.
(Scope_Within_Or_Same): For the case of checking for a task type
procedure, check the Implementation_Base_Type of Curr.

From-SVN: r279344

gcc/ada/ChangeLog
gcc/ada/sem_util.adb

index aabc2d42d3707c51ee8039383f8b636e722d5dd1..4cd789f33fac0d8352f76c395de81fd6fbbe8f34 100644 (file)
@@ -1,3 +1,10 @@
+2019-12-13  Gary Dismukes  <dismukes@adacore.com>
+
+       * sem_util.adb (Scope_Within): For the case of checking for a
+       task type procedure, check the Implementation_Base_Type of Curr.
+       (Scope_Within_Or_Same): For the case of checking for a task type
+       procedure, check the Implementation_Base_Type of Curr.
+
 2019-12-13  Arnaud Charlet  <charlet@adacore.com>
 
        * impunit.adb (Non_Imp_File_Names_12): Add
index 91137ad808ba6f2d73d865150280fbe60ffec5da..ea87a3a33520dd187edd18daa6897a01345109e7 100644 (file)
@@ -24721,8 +24721,9 @@ package body Sem_Util is
          --  A selective accept body appears within a task type, but the
          --  enclosing subprogram is the procedure of the task body.
 
-         elsif Ekind (Curr) = E_Task_Type
-           and then Outer = Task_Body_Procedure (Curr)
+         elsif Ekind (Implementation_Base_Type (Curr)) = E_Task_Type
+           and then
+             Outer = Task_Body_Procedure (Implementation_Base_Type (Curr))
          then
             return True;
 
@@ -24763,8 +24764,9 @@ package body Sem_Util is
          if Curr = Outer then
             return True;
 
-         elsif Ekind (Curr) = E_Task_Type
-           and then Outer = Task_Body_Procedure (Curr)
+         elsif Ekind (Implementation_Base_Type (Curr)) = E_Task_Type
+           and then
+             Outer = Task_Body_Procedure (Implementation_Base_Type (Curr))
          then
             return True;