]> git.ipfire.org Git - thirdparty/gcc.git/commit
algol68: Fix assignment of union overhead values [PR algol68/124049]
authorJames Bohl <bohlj47@gmail.com>
Thu, 12 Feb 2026 03:42:20 +0000 (22:42 -0500)
committerJose E. Marchesi <jemarch@gnu.org>
Thu, 12 Feb 2026 11:58:08 +0000 (12:58 +0100)
commit3593e79a9fbe4266589cb5408cf47583a2cb1ca1
treefcf0349a7b352c24971b3e9482501aaf9f681cbf
parent04159cca134b196d07bcbe7b71e8096ba1f3eda3
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.
gcc/algol68/Make-lang.in
gcc/algol68/a68-moids-sorting.cc [new file with mode: 0644]
gcc/algol68/a68-parser-modes.cc
gcc/algol68/a68.h
gcc/algol68/ga68-exports.pk
gcc/testsuite/algol68/execute/modules/module25a.a68 [new file with mode: 0644]
gcc/testsuite/algol68/execute/modules/module25b.a68 [new file with mode: 0644]
gcc/testsuite/algol68/execute/modules/program-25.a68 [new file with mode: 0644]