See also PR 37132 for namelists. DWARF supports DW_AT_accessibility with DW_ACCESS_private; we should set it for modules. For variables and types, the existing "TREE_PRIVATE (decl)" can be re-used. For NAMELIST one needs more effort.
Any progress?