Skip to content

Commit 5da889e

Browse files
committed
more
1 parent 15dd389 commit 5da889e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

flang/docs/ModFiles.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,16 @@ Module files are Fortran free form source code.
3939
and obtain a matching `foo.mod` file.)
4040
They include the declarations of all visible locally defined entities along
4141
with the private entities on which thef depend.
42-
Entity declarations that span multiple statements are collapsed into
43-
a single *type-declaration-statement*.
42+
43+
Declarations of objects, interfaces, types, and other entities are
44+
regenerated from the compiler's symbol table.
45+
So entity declarations that spanned multiple statements in the source
46+
program are effectivel collapsed into a single *type-declaration-statement*.
47+
Constant expressions that appear in initializers, bounds, and other sites
48+
appear in the module file in as their folded values.
49+
Any compiler directives (`!omp$`, `!acc$`, &c.) relevant to the declarations
50+
of names are also included in the module file.
51+
4452
Executable statements are omitted.
4553

4654
### Header
@@ -90,9 +98,13 @@ for module files and where to write them. By default it will be the current
9098
directory for both.
9199

92100
`-I` specifies directories to search for include files and module
93-
files. `-J` specifies a directory into which module files are written
101+
files.
102+
`-J`, and its alias `-module-dir`, specify a directory into which module files are written
94103
as well as to search for them.
95104

105+
`-fintrinsic-modules-path` is available to specify an alternative location
106+
for Fortran's intrinsic modules.
107+
96108
### Writing module files
97109

98110
When writing a module file, if the existing one matches what would be written,

0 commit comments

Comments
 (0)