[Ada] Do not create a master unless Tasking_Allowed
authorBob Duff <duff@adacore.com>
Thu, 4 Jul 2019 08:06:25 +0000 (08:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:06:25 +0000 (08:06 +0000)
2019-07-04  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_ch3.adb (Access_Definition): Do not create a master unless
Tasking_Allowed. Otherwise, this fails on restricted runtimes.

From-SVN: r273060

gcc/ada/ChangeLog
gcc/ada/sem_ch3.adb

index 2925c84..f11f78b 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-04  Bob Duff  <duff@adacore.com>
+
+       * sem_ch3.adb (Access_Definition): Do not create a master unless
+       Tasking_Allowed. Otherwise, this fails on restricted runtimes.
+
 2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_util.adb (Propagate_DIC_Attributes): Do not propagate the
index a82c2bc..ec86266 100644 (file)
@@ -935,6 +935,7 @@ package body Sem_Ch3 is
       then
          if Is_Limited_Record (Desig_Type)
            and then Is_Class_Wide_Type (Desig_Type)
+           and then Tasking_Allowed
          then
             Build_Class_Wide_Master (Anon_Type);