]> git.feebdaed.xyz Git - 0xmirror/gcc.git/commit
a68: fetch module exports from packet by name
authorJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 22 Dec 2025 23:52:52 +0000 (00:52 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 27 Dec 2025 10:52:46 +0000 (11:52 +0100)
commit8fee84de2650749df3182f088aa322106b8312af
treee03280d1d66bcf5c13b10863c863e23ad31d1dce
parent8834502ce4d47b7088b48f21360934a589f8fb12
a68: fetch module exports from packet by name

A packet (compilation unit) may emit more than one module interface in
its exports section.  This is because a module may publicize the
exports of other module.  This commit makes the import infrastructure
to read multiple module interfaces from exports sections and then look
for the accessed module in the data.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-types.h (struct MOIF_T): Add chain_next to GTY info.
* a68-imports.cc (a68_decode_modes): Mode offsets are relative to
the start of the moif, not the start of the exports.
(a68_decode_moifs): Renamed from a68_decode_moif and changed to
decode multiple moifs from the exports.
(a68_open_packet): Call a68_decode_moifs and look for the right
moif.
* a68-exports.cc (a68_moif_new): Initialize NEXT (moif).

gcc/testsuite/ChangeLog

* algol68/execute/modules/module17.a68: New test.
gcc/algol68/a68-exports.cc
gcc/algol68/a68-imports.cc
gcc/algol68/a68-types.h
gcc/testsuite/algol68/execute/modules/module17.a68