https://gcc.gnu.org/g:4e1468b9ff374445c854ca35e1d9cbc925cda1f7

commit r16-6640-g4e1468b9ff374445c854ca35e1d9cbc925cda1f7
Author: Eric Botcazou <[email protected]>
Date:   Wed Dec 24 20:35:39 2025 +0100

    ada: Move Save_Global_References_In_Aspects into sole caller
    
    No functional changes.
    
    gcc/ada/ChangeLog:
    
            * sem_ch12.ads (Save_Global_References_In_Aspects): Move to...
            * sem_ch12.adb (Save_Global_References_In_Aspects): Move to...
            * contracts.adb (Save_Global_References_In_Contract): ...here.

Diff:
---
 gcc/ada/contracts.adb | 25 +++++++++++++++++++++++++
 gcc/ada/sem_ch12.adb  | 21 ---------------------
 gcc/ada/sem_ch12.ads  |  4 ----
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 8aaf41128723..deea67ed3669 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -4877,10 +4877,35 @@ package body Contracts is
      (Templ  : Node_Id;
       Gen_Id : Entity_Id)
    is
+      procedure Save_Global_References_In_Aspects (N : Node_Id);
+      --  Save all global references found in the expressions of all aspects
+      --  that appear on node N.
+
       procedure Save_Global_References_In_List (First_Prag : Node_Id);
       --  Save all global references in contract-related source pragmas found
       --  in the list, starting with pragma First_Prag.
 
+      ---------------------------------------
+      -- Save_Global_References_In_Aspects --
+      ---------------------------------------
+
+      procedure Save_Global_References_In_Aspects (N : Node_Id) is
+         Asp  : Node_Id;
+         Expr : Node_Id;
+
+      begin
+         Asp := First (Aspect_Specifications (N));
+         while Present (Asp) loop
+            Expr := Expression (Asp);
+
+            if Present (Expr) then
+               Save_Global_References (Expr);
+            end if;
+
+            Next (Asp);
+         end loop;
+      end Save_Global_References_In_Aspects;
+
       ------------------------------------
       -- Save_Global_References_In_List --
       ------------------------------------
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e112a42e8187..cbe453a7af16 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -18665,27 +18665,6 @@ package body Sem_Ch12 is
       Save_References (Templ);
    end Save_Global_References;
 
-   ---------------------------------------
-   -- Save_Global_References_In_Aspects --
-   ---------------------------------------
-
-   procedure Save_Global_References_In_Aspects (N : Node_Id) is
-      Asp  : Node_Id;
-      Expr : Node_Id;
-
-   begin
-      Asp := First (Aspect_Specifications (N));
-      while Present (Asp) loop
-         Expr := Expression (Asp);
-
-         if Present (Expr) then
-            Save_Global_References (Expr);
-         end if;
-
-         Next (Asp);
-      end loop;
-   end Save_Global_References_In_Aspects;
-
    ------------------------------------------
    -- Set_Copied_Sloc_For_Inherited_Pragma --
    ------------------------------------------
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads
index 83c3114667b8..f8f2f024bec9 100644
--- a/gcc/ada/sem_ch12.ads
+++ b/gcc/ada/sem_ch12.ads
@@ -150,10 +150,6 @@ package Sem_Ch12 is
    --  restored in stack-like fashion. Front-end inlining also uses these
    --  structures for the management of private/full views.
 
-   procedure Save_Global_References_In_Aspects (N : Node_Id);
-   --  Save all global references found within the expressions of all aspects
-   --  that appear on node N.
-
    procedure Set_Copied_Sloc_For_Inlined_Body (N : Node_Id; E : Entity_Id);
    --  This procedure is used when a subprogram body is inlined. This process
    --  shares the same circuitry as the creation of an instantiated copy of

Reply via email to