[Ada] gnatbind: Fix No_Entry_Calls_In_Elaboration_Code message
authorBob Duff <duff@adacore.com>
Fri, 12 Jun 2020 13:58:24 +0000 (09:58 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 16 Jul 2020 09:18:18 +0000 (05:18 -0400)
gcc/ada/

* bindo-diagnostics.adb (Output_Invocation_Related_Suggestions):
Use Cumulative_Restrictions.Set, because Restriction_Active only
works at compile time.

gcc/ada/bindo-diagnostics.adb

index c2ffe447b3f8330de53fead63bd33e831f907545..ed1abf8c3775c990cc02b1e5e5732dba724a3d53 100644 (file)
@@ -25,7 +25,6 @@
 
 with Binderr;  use Binderr;
 with Debug;    use Debug;
-with Restrict; use Restrict;
 with Rident;   use Rident;
 with Types;    use Types;
 
@@ -1144,7 +1143,7 @@ package body Bindo.Diagnostics is
       --  within the task body on a select or accept statement, eliminating
       --  subsequent invocation edges, thus breaking the cycle.
 
-      if not Restriction_Active (No_Entry_Calls_In_Elaboration_Code)
+      if not Cumulative_Restrictions.Set (No_Entry_Calls_In_Elaboration_Code)
         and then Contains_Task_Activation (G, Cycle)
       then
          Error_Msg_Info