[COMMITTED,40/51] ada: Remove unnecessary workaround

Message ID 20260602084541.3829876-40-poulhies@adacore.com
State Committed
Headers
Series [COMMITTED,01/51] ada: Rename Private_Component function |

Commit Message

Marc Poulhiès June 2, 2026, 8:45 a.m. UTC
  From: Viljar Indus <indus@adacore.com>

Technically this is no longer necessary as everything will be
removed along with the ignored ghost code removal.

gcc/ada/ChangeLog:

	* sem_prag.adb (Analyze_Pragma): Remove overflow supression
	workaround.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_prag.adb | 28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)
  

Patch

diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index a22ae61cd55..81de61ae9eb 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -15698,33 +15698,7 @@  package body Sem_Prag is
                --  Now go ahead and analyze the if statement
 
                In_Assertion_Expr := In_Assertion_Expr + 1;
-
-               --  One rather special treatment. If we are now in Eliminated
-               --  overflow mode, then suppress overflow checking since we do
-               --  not want to drag in the bignum stuff if we are in Ignore
-               --  mode anyway. This is particularly important if we are using
-               --  a configurable run time that does not support bignum ops.
-
-               if Scope_Suppress.Overflow_Mode_Assertions = Eliminated then
-                  declare
-                     Svo : constant Boolean :=
-                             Scope_Suppress.Suppress (Overflow_Check);
-                  begin
-                     Scope_Suppress.Overflow_Mode_Assertions  := Strict;
-                     Scope_Suppress.Suppress (Overflow_Check) := True;
-                     Analyze (N);
-                     Scope_Suppress.Suppress (Overflow_Check) := Svo;
-                     Scope_Suppress.Overflow_Mode_Assertions  := Eliminated;
-                  end;
-
-               --  Not that special case
-
-               else
-                  Analyze (N);
-               end if;
-
-               --  All done with this check
-
+               Analyze (N);
                In_Assertion_Expr := In_Assertion_Expr - 1;
 
             --  Check is active or expansion not active. In these cases we can