a68: do not rely on DIM to count modes in an union mode
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.
diff --git a/gcc/algol68/a68-exports.cc b/gcc/algol68/a68-exports.cc
index 3b388b1..d56ed5d 100644
--- a/gcc/algol68/a68-exports.cc
+++ b/gcc/algol68/a68-exports.cc
@@ -352,7 +352,7 @@
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");
}