[COMMITTED] a68: do not pub non-publicized indicants in exports

Jose E. Marchesi jemarch@gnu.org
Mon Jun 15 07:43:17 GMT 2026


Even non-publicized modes were being added to the module interfaces.
This was because for all other kind of taxes (identifiers, operator
indicants, etc) the PUBLICIZED tax attribute is set at taxes
collection time, but for mode indicants the flag shall be set at
extraction time.

Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>

gcc/algol68/ChangeLog

	* a68-parser-extract.cc (a68_extract_indicants): Set PUBLICIZED in
	the new tags for mode indicants.
	* a68-parser.cc (a68_new_tag): Initialize PUBLICIZED to false.
---
 gcc/algol68/a68-parser-extract.cc | 4 +++-
 gcc/algol68/a68-parser.cc         | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/algol68/a68-parser-extract.cc b/gcc/algol68/a68-parser-extract.cc
index 82ceb776116..fc1f318eaaf 100644
--- a/gcc/algol68/a68-parser-extract.cc
+++ b/gcc/algol68/a68-parser-extract.cc
@@ -485,8 +485,10 @@ a68_extract_indicants (NODE_T *p)
 		  /* Store in the symbol table, but also in the moid list.
 		     Position of definition (q) connects to this lexical
 		     level!  */
-		  if (a68_add_tag (TABLE (p), INDICANT, q, NO_MOID, STOP) == NO_TAG)
+		  TAG_T *t = a68_add_tag (TABLE (p), INDICANT, q, NO_MOID, STOP);
+		  if (t == NO_TAG)
 		    gcc_unreachable ();
+		  PUBLICIZED (t) = is_public;
 		  if (a68_add_mode (&TOP_MOID (&A68_JOB), INDICANT, 0, q, NO_MOID, NO_PACK) == NO_MOID)
 		    gcc_unreachable ();
 		  ATTRIBUTE (q) = DEFINING_INDICANT;
diff --git a/gcc/algol68/a68-parser.cc b/gcc/algol68/a68-parser.cc
index 1eff76a2571..4303d5297e8 100644
--- a/gcc/algol68/a68-parser.cc
+++ b/gcc/algol68/a68-parser.cc
@@ -788,7 +788,7 @@ a68_new_tag (void)
   PORTABLE (z) = true;
   VARIABLE (z) = false;
   IS_RECURSIVE (z) = false;
-  PUBLICIZED (z) = true; /* XXX */
+  PUBLICIZED (z) = false;
   ASCRIBED_ROUTINE_TEXT (z) = false;
   LOWERER (z) = NO_LOWERER;
   TAX_TREE_DECL (z) = NULL_TREE;
-- 
2.39.5



More information about the Algol68 mailing list