]> git.ipfire.org Git - thirdparty/gcc.git/commit
a68: fix support for nested access clauses
authorJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 23 Dec 2025 14:53:36 +0000 (15:53 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 27 Dec 2025 10:52:47 +0000 (11:52 +0100)
commit791d7e85cc6326151dd12ca9f2b22db9b0e30476
treef7f488aad3704c482011b9534b49c17b3b1d8b82
parent8fee84de2650749df3182f088aa322106b8312af
a68: fix support for nested access clauses

This commit fixes the support for having an access clause as the
controlled clause of another access clause.

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

* a68-parser-top-down.cc (top_down_access): An access clause may
be nested in another access clause.
* a68-parser-extract.cc (a68_extract_indicants): Coalesce 'pub'
symbols.
(a68_extract_indicants): Nested access are not allowed in module
texts.
* a68-parser-bottom-up.cc (expected_module_text): New function.
(reduce_prelude_packet): Use expected_module_text.
(a68_bottom_up_error_check): Add comment.

gcc/testsuite/ChangeLog

* algol68/compile/error-module-nested-access-1.a68: New test.
* algol68/execute/modules/program-21.a68: Likewise.
gcc/algol68/a68-parser-bottom-up.cc
gcc/algol68/a68-parser-extract.cc
gcc/algol68/a68-parser-top-down.cc
gcc/testsuite/algol68/compile/error-module-nested-access-1.a68 [new file with mode: 0644]
gcc/testsuite/algol68/execute/modules/program-21.a68 [new file with mode: 0644]