]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: do not rely on DIM to count modes in an union mode
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 31 Dec 2025 22:34:04 +0000 (23:34 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 31 Dec 2025 22:40:48 +0000 (23:40 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-exports.cc (a68_asm_output_mode): Do not rely on DIM to
count modes in an union mode.

gcc/algol68/a68-exports.cc

index 3b388b156743c3038f1605c2fdc1d864c8ad022c..d56ed5dd4f4566805bd8da1810e165c46d71a599 100644 (file)
@@ -352,7 +352,7 @@ a68_asm_output_mode (MOID_T *m, const char *module_label)
   else if (IS_UNION (m))
     {
       dw2_asm_output_data (1, GA68_MODE_UNION, "union");
-      dw2_asm_output_data (2, DIM (m), "nmodes");
+      dw2_asm_output_data (2, a68_count_pack_members (PACK (m)), "nmodes");
       for (PACK_T *p = PACK (m); p != NO_PACK; FORWARD (p))
        dw2_asm_output_delta (PTR_SIZE, ASM_LABEL (MOID (p)), module_label, "united mode");
     }