Signed-off-by: Jose E. Marchesi <[email protected]>

gcc/algol68/ChangeLog

        * a68-parser-scope.cc (scope_access_clause): New function.
        (scope_enclosed_clause): Use scope_access_clause.
---
 gcc/algol68/a68-parser-scope.cc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gcc/algol68/a68-parser-scope.cc b/gcc/algol68/a68-parser-scope.cc
index e76a3c04409..e04704e25b6 100644
--- a/gcc/algol68/a68-parser-scope.cc
+++ b/gcc/algol68/a68-parser-scope.cc
@@ -54,6 +54,7 @@ static void scope_statement (NODE_T *, SCOPE_T **);
 static void scope_enclosed_clause (NODE_T *, SCOPE_T **);
 static void scope_formula (NODE_T *, SCOPE_T **);
 static void scope_routine_text (NODE_T *, SCOPE_T **);
+static void scope_access_clause (NODE_T *, SCOPE_T **);
 
 /*
  * Static scope checker.
@@ -898,6 +899,18 @@ scope_loop_clause (NODE_T *p)
     }
 }
 
+/* Scope and access-clause.  */
+
+static void
+scope_access_clause (NODE_T *p, SCOPE_T **s)
+{
+  for (; p != NO_NODE; FORWARD (p))
+    {
+      if (IS (p, ENCLOSED_CLAUSE))
+       scope_enclosed_clause (SUB (p), s);
+    }
+}
+
 /* Scope_enclosed_clause.  */
 
 static void
@@ -915,6 +928,8 @@ scope_enclosed_clause (NODE_T *p, SCOPE_T **s)
     scope_case_clause (SUB (p), s);
   else if (IS (p, LOOP_CLAUSE))
     scope_loop_clause (SUB (p));
+  else if (IS (p, ACCESS_CLAUSE))
+    scope_access_clause (SUB (p), s);
 }
 
 /* Whether a symbol table contains no (anonymous) definition.  */
-- 
2.30.2

Reply via email to