diff --git a/.gitmodules b/.gitmodules index de1a474e98..445f0a293c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,6 @@ [submodule "dace/external/rtllib"] path = dace/external/rtllib url = https://github.com/carljohnsen/rtllib.git +[submodule "latex-tools"] + path = latex-tools + url = https://github.com/mcopik/latex-tools diff --git a/dace/frontend/fortran/ast_utils.py b/dace/frontend/fortran/ast_utils.py index a3d93537d5..5e6b89d151 100644 --- a/dace/frontend/fortran/ast_utils.py +++ b/dace/frontend/fortran/ast_utils.py @@ -95,6 +95,18 @@ def eliminate_dependencies(dep_graph:nx.digraph.DiGraph): for used_name in actually_used: for var in res.list_of_module_vars: for ii in var.children: + + # Support scenario where an imported symbol appears in kind selector + # Example: REAL(KIND=JPRB) :: R2ES + # Where JPRB is imported from another module. + if ii.__class__.__name__ == "Intrinsic_Type_Spec": + + for iii in ii.children: + if iii.__class__.__name__ == "Kind_Selector": + name_to_check = iii.children[1].string + if name_to_check not in actually_used: + actually_used.append(name_to_check) + if ii.__class__.__name__=="Entity_Decl_List": for iii in ii.children: if iii.__class__.__name__=="Entity_Decl": diff --git a/latex-tools b/latex-tools new file mode 160000 index 0000000000..f4fb16e4be --- /dev/null +++ b/latex-tools @@ -0,0 +1 @@ +Subproject commit f4fb16e4be01e2666ee09f5903906925779386c4