diff --git a/src/psyclone/psyir/symbols/symbol_table.py b/src/psyclone/psyir/symbols/symbol_table.py index d3e09158e4..6d388ba731 100644 --- a/src/psyclone/psyir/symbols/symbol_table.py +++ b/src/psyclone/psyir/symbols/symbol_table.py @@ -1625,6 +1625,11 @@ def resolve_imports(self, container_symbols=None, symbol_target=None): # TODO #11: It would be useful to log this. continue + if not external_container: + # Failed to get a Container (possibly due to parsing or raising + # errors). + continue + # Examine all Symbols defined within this external container for symbol in external_container.symbol_table.symbols: if symbol.visibility == Symbol.Visibility.PRIVATE: diff --git a/src/psyclone/psyir/transformations/inline_trans.py b/src/psyclone/psyir/transformations/inline_trans.py index 5fa4b35228..a0892a31ea 100644 --- a/src/psyclone/psyir/transformations/inline_trans.py +++ b/src/psyclone/psyir/transformations/inline_trans.py @@ -212,7 +212,6 @@ def apply(self, node, options=None): for child in new_stmts: idx += 1 parent.addchild(child, idx) - table = parent.scope.symbol_table # Avoid a potential name clash with the original function table.rename_symbol( routine.return_symbol, table.next_available_name(