]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR ada/80590
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 2019 07:32:14 +0000 (07:32 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 17 Jun 2019 07:32:14 +0000 (07:32 +0000)
* exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
conditions to avoid a unnecessary exception propagation in the default
case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272372 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/exp_ch9.adb

index 3b60a92b2d719b3d4cff46177791d78921182e66..f73bb4989b94b42efad24013fc9734667c23846f 100644 (file)
@@ -1,3 +1,11 @@
+2019-06-17  Arnaud Charlet  <charlet@adacore.com>
+
+PR ada/80590
+
+       * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Swap the two
+       conditions to avoid a unnecessary exception propagation in the default
+       case.
+
 2019-05-28  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
index 5ec9fb486e5679b7e4e7d9fe6bbcd60d23d4af3c..a3785d7c667ddabbe3758fda0c504624823d2bb4 100644 (file)
@@ -8258,18 +8258,17 @@ package body Exp_Ch9 is
       Proc : Entity_Id;
 
    begin
-      --  Try to use System.Relative_Delays.Delay_For only if available. This
-      --  is the implementation used on restricted platforms when Ada.Calendar
-      --  is not available.
+      --  Try to use Ada.Calendar.Delays.Delay_For if available.
 
-      if RTE_Available (RO_RD_Delay_For) then
-         Proc := RTE (RO_RD_Delay_For);
+      if RTE_Available (RO_CA_Delay_For) then
+         Proc := RTE (RO_CA_Delay_For);
 
-      --  Otherwise, use Ada.Calendar.Delays.Delay_For and emit an error
-      --  message if not available.
+      --  Otherwise, use System.Relative_Delays.Delay_For and emit an error
+      --  message if not available. This is the implementation used on
+      --  restricted platforms when Ada.Calendar is not available.
 
       else
-         Proc := RTE (RO_CA_Delay_For);
+         Proc := RTE (RO_RD_Delay_For);
       end if;
 
       Rewrite (N,