https://gcc.gnu.org/g:cb570f8424eea3ba54ad7a082fcf5e56c3a40f31

commit r16-7440-gcb570f8424eea3ba54ad7a082fcf5e56c3a40f31
Author: Jose E. Marchesi <[email protected]>
Date:   Tue Feb 10 19:01:18 2026 +0100

    a68: lower body of formal hole after context is set
    
    Signed-off-by: Jose E. Marchesi <[email protected]>
    
    gcc/algol68/ChangeLog
    
            * a68-low-units.cc (a68_lower_formal_hole): Call
            a68_wrap_formal_proc_hole after a68_add_decl.

Diff:
---
 gcc/algol68/a68-low-units.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/algol68/a68-low-units.cc b/gcc/algol68/a68-low-units.cc
index 23f4f22e7c16..b4ce00a24f78 100644
--- a/gcc/algol68/a68-low-units.cc
+++ b/gcc/algol68/a68-low-units.cc
@@ -1271,9 +1271,6 @@ a68_lower_formal_hole (NODE_T *p, LOW_CTX_T ctx 
ATTRIBUTE_UNUSED)
          TAX_TREE_DECL (TAX (defining_identifier)) = func_decl;
        }
 
-      /* Create the body for the wrapper from the formal hole. */
-      a68_wrap_formal_proc_hole (p, func_decl);
-
       /* If the identity-declaration is in a public range then add the
         declaration to the module's declarations list.  Otherwise chain the
         declaration in the proper block and bind it.  */
@@ -1286,6 +1283,10 @@ a68_lower_formal_hole (NODE_T *p, LOW_CTX_T ctx 
ATTRIBUTE_UNUSED)
                                          DECL_EXPR,
                                          TREE_TYPE (func_decl),
                                          func_decl));
+
+      /* Create the body for the wrapper from the formal hole. */
+      a68_wrap_formal_proc_hole (p, func_decl);
+
       return func_decl;
     }
   else

Reply via email to