https://gcc.gnu.org/g:59ca6e03721734d2376db9bc770132fe1c1e76fe

commit r16-3688-g59ca6e03721734d2376db9bc770132fe1c1e76fe
Author: Piotr Trojanek <[email protected]>
Date:   Wed Jul 30 12:08:46 2025 +0200

    ada: Check restriction No_Secondary_Stack for overflow elimination
    
    When overflow checks are eliminated using System.Bignums package, we must
    check if secondary stack that is necessary for this package is available.
    
    gcc/ada/ChangeLog:
    
            * checks.adb (Make_Bignum_Block): Check restriction 
No_Secondary_Stack.

Diff:
---
 gcc/ada/checks.adb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index dfda0a6622bc..a9bebee3e139 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -8948,6 +8948,8 @@ package body Checks is
    function Make_Bignum_Block (Loc : Source_Ptr) return Node_Id is
       M : constant Entity_Id := Make_Defining_Identifier (Loc, Name_uM);
    begin
+      Check_Restriction (No_Secondary_Stack, M);
+
       return
         Make_Block_Statement (Loc,
           Declarations               =>

Reply via email to