Hi, Following review feedback, this version adds the requested commit subject prefix and an explanatory comment before the return statement in a68_get_alias_set.
The frontend builds successfully and make check-algol68 passes with this change. Thanks, Kanishka Solanki
From daf6fde806010dcff462d4078992621646d841ae Mon Sep 17 00:00:00 2001 From: Kanishka Solanki <[email protected]> Date: Sun, 21 Jun 2026 21:34:40 +0530 Subject: [PATCH] a68: return alias set 0 for Algol 68 The default LANG_HOOKS_GET_ALIAS_SET implementation returns -1, causing GCC to use its default alias set machinery. Override LANG_HOOKS_GET_ALIAS_SET in the Algol 68 frontend and return 0 so all objects are treated as potentially aliasing. gcc/algol68/ChangeLog * a68-lang.cc (a68_get_alias_set): New function. (LANG_HOOKS_GET_ALIAS_SET): Define to a68_get_alias_set. Signed-off-by: Kanishka Solanki <[email protected]> --- gcc/algol68/a68-lang.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/algol68/a68-lang.cc b/gcc/algol68/a68-lang.cc index 0fa38c210e4..1cefb08c5ab 100644 --- a/gcc/algol68/a68-lang.cc +++ b/gcc/algol68/a68-lang.cc @@ -786,6 +786,19 @@ a68_types_compatible_p (tree x, tree y) #undef LANG_HOOKS_TYPES_COMPATIBLE_P #define LANG_HOOKS_TYPES_COMPATIBLE_P a68_types_compatible_p +/* Implements the lang_hooks.get_alias_set routine for Algol 68. */ + +static alias_set_type +a68_get_alias_set (tree) +{ + /* For now in Algol 68, assume everything aliases everything else, + until aliasing rules are defined more precisely. */ + return 0; +} + +#undef LANG_HOOKS_GET_ALIAS_SET +#define LANG_HOOKS_GET_ALIAS_SET a68_get_alias_set + /* Get a value for the SARIF v2.1.0 "artifact.sourceLanguage" property. Algol 68 is not yet listed in SARIF v2.1.0 Appendix J, but if/when it does, it will likely use this string. */ -- 2.43.0
