]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: lower body of formal hole after context is set
authorJose E. Marchesi <jemarch@gnu.org>
Tue, 10 Feb 2026 18:01:18 +0000 (19:01 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Tue, 10 Feb 2026 18:02:54 +0000 (19:02 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-low-units.cc (a68_lower_formal_hole): Call
a68_wrap_formal_proc_hole after a68_add_decl.

gcc/algol68/a68-low-units.cc

index 23f4f22e7c164b669f7e13a6a3dd3f33a48a2ca4..b4ce00a24f7844d0f2422f2418b10c14432d3e76 100644 (file)
@@ -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