algol68: Fix assignment of union overhead values [PR algol68/124049]
This patch sorts union packs in the a68-parser function so that
equivalent unions defined in different packets are assigned the same
mapping of mode to overhead value.
Signed-off-by: James Bohl <bohlj47@gmail.com>
gcc/algol68/ChangeLog
PR algol68/124049
* Make-lang.in (ALGOL68_OBJS): Add algol68/a68-moids-sorting.o.
* a68.h: Add prototype for a68_sort_union_packs.
* a68-moids-sorting.cc: New file.
* a68-parser-modes.cc (a68_make_moid_list): Call a68_sort_union_packs.
* ga68-exports.pk (ga68_mode_64): Add comment on union mode ordering.
gcc/testsuite/ChangeLog
PR algol68/124049
* algol68/execute/modules/program-25.a68: New test.
* algol68/execute/modules/module25a.a68: New file.
* algol68/execute/modules/module25b.a68: New file.