[Ada] Crash in tagged type constructor with task components
authorJavier Miranda <miranda@adacore.com>
Fri, 3 Apr 2020 21:29:48 +0000 (17:29 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 16 Jun 2020 13:07:12 +0000 (09:07 -0400)
2020-06-16  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* restrict.adb (Global_No_Tasking): Adding
Targparm.Restrictions_On_Target Fixes regressions with zfp.

gcc/ada/restrict.adb

index ebdc7ce1c237e064ccb3b1e88d5bdbd15350fb9a..0dab4c5879dd2c1fb522b97226f20240c7dd4e7d 100644 (file)
@@ -35,6 +35,7 @@ with Opt;      use Opt;
 with Sinfo;    use Sinfo;
 with Sinput;   use Sinput;
 with Stand;    use Stand;
+with Targparm; use Targparm;
 with Uname;    use Uname;
 
 package body Restrict is
@@ -908,7 +909,8 @@ package body Restrict is
 
    function Global_No_Tasking return Boolean is
    begin
-      return Global_Restriction_No_Tasking;
+      return Global_Restriction_No_Tasking
+        or else Targparm.Restrictions_On_Target.Set (No_Tasking);
    end Global_No_Tasking;
 
    -------------------------------