Skip to content

Commit

Permalink
Check that we have the called routine definition
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfhm committed Oct 16, 2023
1 parent 3e7a28c commit 2afa472
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion loki/transform/transform_scalar_syntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from loki.ir import CallStatement
from loki.visitors import FindNodes, Transformer
from loki.tools import as_tuple
from loki.types import BasicType


__all__ = [
Expand Down Expand Up @@ -109,7 +110,8 @@ def fix_scalar_syntax(routine):
The subroutine where calls will be changed
"""

calls = FindNodes(CallStatement).visit(routine.body)
#List calls in routine, but make sure we have the called routine definition
calls = (c for c in FindNodes(CallStatement).visit(routine.body) if not c.procedure_type is BasicType.DEFERRED)
call_map = {}

for call in calls:
Expand Down

0 comments on commit 2afa472

Please sign in to comment.