Summary
For Fortran code that uses the standard module/submodule separation — interface
declared in a module, implementation in a submodule, each in its own file —
the extractor creates two nodes for the same procedure (one per file) with
no edge of any kind between them. The submodule (parent) name header is
not recognised, so the parent–child relationship between the two files is
completely absent from the graph, and the duplicate nodes cannot be merged
even in principle.
Since node ids are file-scoped, the same applies to use-association: every
file that uses a module (including intrinsics like iso_fortran_env) mints
a fresh per-file node instead of resolving to the defining node.
Reproducer
Two files (compile cleanly with gfortran -c sym_ex.f90 sym_ex_sm.f90):
sym_ex.f90 — the module, declaring the interface:
module sym_ex
implicit none
interface
pure module function add_e(a,b) result(r)
real(8), intent(in) :: a, b
real(8) :: r
end function add_e
end interface
end module sym_ex
sym_ex_sm.f90 — the submodule, providing the implementation:
submodule (sym_ex) sym_ex_sm
implicit none
contains
pure module function add_e(a,b) result(r)
real(8), intent(in) :: a, b
real(8) :: r
r = a + b
end function add_e
end submodule sym_ex_sm
Summary
For Fortran code that uses the standard module/submodule separation — interface
declared in a module, implementation in a
submodule, each in its own file —the extractor creates two nodes for the same procedure (one per file) with
no edge of any kind between them. The
submodule (parent) nameheader isnot recognised, so the parent–child relationship between the two files is
completely absent from the graph, and the duplicate nodes cannot be merged
even in principle.
Since node ids are file-scoped, the same applies to
use-association: everyfile that
uses a module (including intrinsics likeiso_fortran_env) mintsa fresh per-file node instead of resolving to the defining node.
Reproducer
Two files (compile cleanly with
gfortran -c sym_ex.f90 sym_ex_sm.f90):sym_ex.f90— the module, declaring the interface:module sym_ex implicit none interface pure module function add_e(a,b) result(r) real(8), intent(in) :: a, b real(8) :: r end function add_e end interface end module sym_exsym_ex_sm.f90— the submodule, providing the implementation:submodule (sym_ex) sym_ex_sm implicit none contains pure module function add_e(a,b) result(r) real(8), intent(in) :: a, b real(8) :: r r = a + b end function add_e end submodule sym_ex_sm