From: Jose E. Marchesi Date: Wed, 31 Dec 2025 22:34:04 +0000 (+0100) Subject: a68: do not rely on DIM to count modes in an union mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96c704b082e4a5c1d39466499c7419377a643281;p=thirdparty%2Fgcc.git a68: do not rely on DIM to count modes in an union mode Signed-off-by: Jose E. Marchesi gcc/algol68/ChangeLog * a68-exports.cc (a68_asm_output_mode): Do not rely on DIM to count modes in an union mode. --- diff --git a/gcc/algol68/a68-exports.cc b/gcc/algol68/a68-exports.cc index 3b388b15674..d56ed5dd4f4 100644 --- a/gcc/algol68/a68-exports.cc +++ b/gcc/algol68/a68-exports.cc @@ -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"); }