460 Commits

Author SHA1 Message Date
Yanzuo Liu
3b27d50cc7
[LLVM][utils] Add script which clears release notes (#153593)
The script copies `ReleaseNotesTemplate.txt` to corresponding
`ReleaseNotes.rst`/`.md` to clear release notes.

The suffix of `ReleaseNotesTemplate.txt` must be `.txt`. If it is
`.rst`/`.md`, it will be treated as a documentation source file when
building documentation.
2025-08-15 19:00:08 +08:00
Peter Klausler
7a13a756d6
[flang][NFC] Document ALLOCATE/DEALLOCATE error semantics (#153027)
This compiler stops an ALLOCATE/DEALLOCATE statement with multiple
variables after encountering a recoverable error to avoid the risk of
ambiguity in the case of multiple errors. Document.
2025-08-13 14:36:51 -07:00
Peter Klausler
effa35d240
[flang][runtime] Don't always accept a bare exponent letter (#151597)
For more accurate compatibility with other compilers' extensions, accept
a bare exponent letter as valid real input to a formatted READ statement
only in a fixed-width input field. So it works with (G1.0) editing, but
not (G)/(D)/(E)/(F) or list-directed input.

Fixes https://github.com/llvm/llvm-project/issues/151465.
2025-08-05 13:39:33 -07:00
Connector Switch
b00d4f2350
[flang][doc] Update some F2023 status. (#151165)
- Trig functions: done with various earlier commits like #149343.
- c_f_pointer: #149870.
2025-07-31 08:09:12 +08:00
Peter Klausler
35cabd69e6
[flang] Support fixed-width input field truncation for LOGICAL (#151203)
As a common extension, we support the truncation of fixed-width fields
for non-list-directed input editing when a separator character (',' or
';' depending on DECIMAL='POINT' or 'COMMA' resp.) appears in the field.
This isn't working for L input editing; fix.

(The bug reports a failure with DC mode, but it doesn't work with a
comma either.)

Fixes https://github.com/llvm/llvm-project/issues/151178.
2025-07-30 11:42:14 -07:00
Sergio Afonso
15980624ac
[Flang][OpenMP][Docs] Update target-related support in Flang docs, NFC (#150443)
Update docs to state that reduction is supported on OpenMP `loop` and
`teams` standalone and compound constructs.
2025-07-29 16:50:39 +01:00
Michael Klemm
f834b0c3a7
[Flang] Implement LOWER= argument for C_F_POINTER (Fortran 2023) (#149870)
This PR resolves issue #147819 and adds support for the F2023 extension
of the `LOWER=` argument for `C_F_POINTER`.
2025-07-25 21:35:01 +02:00
Tobias Hieta
3d8db8ef50 Clear release notes on main for LLVM 22 2025-07-24 11:36:11 +02:00
Connector Switch
c875bb8eef
[flang] Minor revision of the getting started guide. (#149632)
- C++17 is now the default, no need to specify explicitly.

b3c9ed151f/flang/CMakeLists.txt (L13)

- The current recommended way to set up OpenMP is as a runtime, not as a
project.

b3c9ed151f/llvm/CMakeLists.txt (L209-L214)
2025-07-19 13:41:07 +08:00
Eugene Epshteyn
413e71b700
[flang] Main program symbol no longer conflicts with the other symbols (#149169)
The following code is now accepted:
```
module m
end
program m
use m
end
```
The PROGRAM name doesn't really have an effect on the compilation
result, so it shouldn't result in symbol name conflicts.

This change makes the main program symbol name all uppercase in the
cooked character stream. This makes it distinct from all other symbol
names that are all lowercase in cooked character stream.

Modified the tests that were checking for lower case main program name.
2025-07-17 14:18:21 -04:00
Brad Richardson
8d21025c3a
[flang] Parallel runtime library design doc (PRIF) (#76088)
The Parallel Runtime Interface for Fortran (PRIF) specifies the interface design for 
supporting Fortran's multi-image parallel features in flang.

---------

Co-authored-by: Katherine Rasmussen <krasmussen@lbl.gov>
Co-authored-by: Damian Rouson <rouson@lbl.gov>
Co-authored-by: Dan Bonachea <dobonachea@lbl.gov>
2025-07-16 10:14:26 -07:00
Peter Klausler
bbcdad1f8e
[flang][runtime] MCLOCK library routine (#148960)
Add MCLOCK as an interface to std::clock().
2025-07-16 09:10:07 -07:00
Susan Tan (ス-ザン タン)
ada514b0af
[flang][acc][NFC] Add deviation to the spec that declaring the same variable is permitted (#148288)
OpenACC spec says `A var may appear at most once in all the clauses of
declare directives for a function, subroutine, program, or module.` but
our implementation allows it with a warning generated. Add this to the
diviation list for record.
2025-07-14 16:55:40 -04:00
Peter Klausler
69f38443e5
[flang] Extension: TRANSFER(boz, integer or real scalar) (#147604)
Interpret TRANSFER(SOURCE=BOZ literal, MOLD=integer or real scalar) as
if it had been a reference to the standard INT or REAL intrinsic
functions, for which a BOZ literal is an acceptable argument, with a
warning about non-conformance. It's a needless extension that has
somehow crept into some other compilers and real applications.
2025-07-14 11:12:50 -07:00
Tom Eccles
6630cde4e6
[flang][docs] Update release notes for OpenMP (#147988)
Co-authored-by: Kiran Chandramohan <kiranchandramohan@gmail.com>
2025-07-11 12:18:35 +01:00
Shunsuke Watanabe
c9900015a9
[flang] Add -fcomplex-arithmetic= option and select complex division algorithm (#146641)
This patch adds an option to select the method for computing complex
number division. It uses `LoweringOptions` to determine whether to lower
complex division to a runtime function call or to MLIR's `complex.div`,
and `CodeGenOptions` to select the computation algorithm for
`complex.div`. The available option values and their corresponding
algorithms are as follows:
- `full`: Lower to a runtime function call. (Default behavior)
- `improved`: Lower to `complex.div` and expand to Smith's algorithm.
- `basic`: Lower to `complex.div` and expand to the algebraic algorithm.

See also the discussion in the following discourse post:
https://discourse.llvm.org/t/optimization-of-complex-number-division/83468

---------

Co-authored-by: Tarun Prabhu <tarunprabhu@gmail.com>
2025-07-09 13:43:54 +09:00
Kiran Chandramohan
5271f9fba9
[Flang][Doc] NFC: Minor fix for headings (#147077)
Use a top level section to ensure that there is only one entry in the
flang.llvm.org/docs page.

Also generate a table of contents.
2025-07-07 09:57:03 +01:00
KAWASHIMA Takahiro
d67013a2b4
[Flang][AArch64][VecLib] Add libmvec support for Flang/AArch64 (#146453)
`-fveclib=libmvec` for AArch64 (NEON and SVE) in Clang was supported by
#143696. This patch does the same for Flang.

Vector functions defined in `libmvec` are used for the following Fortran
operator and functions currently.

- Power operator (`**`)
- Fortran intrinsic functions listed below for `real(kind=4)` and
`real(kind=8)` (including their coresponding specific intrinsic
functions)
- Fortran intrinsic functions which are expanded using functions listed
below (for example, `sin` for `complex(kind=8)`)

```
sin
tan
cos
asin
acos
atan (both atan(x) and atan(y, x))
atan2
cosh
tanh
asinh
acosh
atanh
erf
erfc
exp
log
log10
```

As with Clang/AArch64, glibc 2.40 or higher is required to use all these
functions.
2025-07-03 14:38:45 +09:00
Peter Klausler
407542b3ec
[flang] Process pointer component default initializers sooner (#145601)
Name resolution defers the analysis of all object pointer initializers
to the end of a specification part, including the default initializers
of derived type data pointer components. This deferment allows object
pointer initializers to contain forward references to objects whose
declarations appear later.

However, this deferment has the unfortunate effect of causing NULL
default initialization of such object pointer components when they do
not appear in structure constructors that are used as default
initializers, and their default initializers are required. So handle
object pointer default initializers of components as they appear, as
before.
2025-06-30 10:25:00 -07:00
Peter Klausler
dccc0266f4
[flang][runtime] Allow INQUIRE(IOLENGTH=) in the presence of defined I/O (#144541)
When I/O list items include instances of derived types for which defined
I/O procedures exist, ignore them.

Fixes https://github.com/llvm/llvm-project/issues/144363.
2025-06-30 10:20:39 -07:00
David Truby
892a263106
[flang] Add release note for compiler-rt dependency on AArch64 (#145547) 2025-06-25 11:39:27 +01:00
Paul Osmialowski
4b9f7cd856
[flang] flang manpage overhaul (#144948)
Make the flang man page look more like the one clang is having.
2025-06-24 00:07:10 +01:00
Peter Klausler
2bf3ccabfa
[flang] Restructure runtime to avoid recursion (relanding) (#143993)
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

(Relanding this patch after reverting initial attempt due to some test
failures that needed some time to analyze and fix.)

Fixes https://github.com/llvm/llvm-project/issues/142481.
2025-06-16 14:37:01 -07:00
Krzysztof Parzyszek
141d390dcb
[flang][OpenMP] Overhaul implementation of ATOMIC construct (#137852)
The parser will accept a wide variety of illegal attempts at forming an
ATOMIC construct, leaving it to the semantic analysis to diagnose any
issues. This consolidates the analysis into one place and allows us to
produce more informative diagnostics.

The parser's outcome will be parser::OpenMPAtomicConstruct object
holding the directive, parser::Body, and an optional end-directive. The
prior variety of OmpAtomicXyz classes, as well as OmpAtomicClause have
been removed. READ, WRITE, etc. are now proper clauses.

The semantic analysis consistently operates on "evaluation"
representations, mainly evaluate::Expr (as SomeExpr) and
evaluate::Assignment. The results of the semantic analysis are stored in
a mutable member of the OpenMPAtomicConstruct node. This follows a
precedent of having `typedExpr` member in parser::Expr, for example.
This allows the lowering code to avoid duplicated handling of AST nodes.

Using a BLOCK construct containing multiple statements for an ATOMIC
construct that requires multiple statements is now allowed. In fact, any
nesting of such BLOCK constructs is allowed.

This implementation will parse, and perform semantic checks for both
conditional-update and conditional-update-capture, although no MLIR will
be generated for those. Instead, a TODO error will be issues prior to
lowering.

The allowed forms of the ATOMIC construct were based on the OpenMP 6.0
spec.
2025-06-11 10:05:34 -05:00
Peter Klausler
10f512f7bb
Revert runtime work queue patch, it breaks some tests that need investigation (#143713)
Revert "[flang][runtime] Another try to fix build failure"

This reverts commit 13869cac2b5051e453aa96ad71220d9d33404620.

Revert "[flang][runtime] Fix build bot flang-runtime-cuda-gcc errors
(#143650)"

This reverts commit d75e28477af0baa063a4d4cc7b3cf657cfadd758.

Revert "[flang][runtime] Replace recursion with iterative work queue
(#137727)"

This reverts commit 163c67ad3d1bf7af6590930d8f18700d65ad4564.
2025-06-11 07:55:06 -07:00
Peter Klausler
163c67ad3d
[flang][runtime] Replace recursion with iterative work queue (#137727)
Recursion, both direct and indirect, prevents accurate stack size
calculation at link time for GPU device code. Restructure these
recursive (often mutually so) routines in the Fortran runtime with new
implementations based on an iterative work queue with
suspendable/resumable work tickets: Assign, Initialize, initializeClone,
Finalize, and Destroy.

Default derived type I/O is also recursive, but already disabled. It can
be added to this new framework later if the overall approach succeeds.

Note that derived type FINAL subroutine calls, defined assignments, and
defined I/O procedures all perform callbacks into user code, which may
well reenter the runtime library. This kind of recursion is not handled
by this change, although it may be possible to do so in the future using
thread-local work queues.

The effects of this restructuring on CPU performance are yet to be
measured.
2025-06-10 14:44:19 -07:00
Samarth Narang
47171ac3f9
[Flang] Add Sphinx man page and html support for Flang (#141882)
This patch refactors the Flang documentation CMake and Sphinx
configuration to address build issues.

**CMake changes**:

- Moves the `gen_rst_file_from_td()` call out of the HTML-only block so
that both `docs-flang-html` and `docs-flang-man` builds depend on the
generated `FlangCommandLineReference.rst` file.

**conf.py changes**:
- Introduces `myst_parser` dependency as a required Markdown parser for
both HTML and man builds.
- Introduces the correct source_suffix mapping for both .rst and .md
files.
- Populates the man_pages configuration so the main index page generates
a ` flang(1) `man page.

Fixes #141757

---------

Authored-by: Samarth Narang <samanara@qti.qualcomm.com>
2025-06-04 22:24:42 +01:00
Peter Klausler
4b23d4c7ca
[flang] Extension: allow override of inaccessible DEFERRED binding (#142691)
Inaccessible procedure bindings can't be overridden, but DEFERRED
bindings must be in a non-abstract extension. We presently emit an error
for an attempt to override an inaccessible binding in this case. But
some compilers accept this usage, and since it seems safe enough, I'll
allow it with an optional warning. Codes can avoid this warning and
conform to the standard by changing the deferred bindings to be public.
2025-06-04 09:23:34 -07:00
Abid Qadeer
de38c4eaf5
[flang][driver] Introduce FCC_OVERRIDE_OPTIONS. (#140556)
This PR add functionality to change `flang` command line using
environment variable `FCC_OVERRIDE_OPTIONS`. It is quite similar to what
`CCC_OVERRIDE_OPTIONS` does for clang.

The `FCC_OVERRIDE_OPTIONS` seemed like the most obvious name to me but I
am open to other ideas. The `applyOverrideOptions` now takes an extra
argument that is the name of the environment variable. Previously
`CCC_OVERRIDE_OPTIONS` was hardcoded.
2025-06-02 11:37:26 +01:00
Yussur Mustafa Oraji
5c3bf36c99
[flang] Add __COUNTER__ preprocessor macro (#136827)
This commit adds support for the `__COUNTER__` preprocessor macro, which
works the same as the one found in clang.
It is useful to generate unique names at compile-time.
2025-05-30 08:33:53 -04:00
Peter Klausler
145712555f
[flang] Allow forward reference to non-default INTEGER dummy (#141254)
A dummy argument with an explicit INTEGER type of non-default kind can
be forward-referenced from a specification expression in many Fortran
compilers. Handle by adding type declaration statements to the initial
pass over a specification part's declaration constructs. Emit an
optional warning under -pedantic.

Fixes https://github.com/llvm/llvm-project/issues/140941.
2025-05-28 14:01:28 -07:00
Peter Klausler
4c6b60a639
[flang] Extension: allow char string edit descriptors in input formats (#140624)
FORMAT("J=",I3) is accepted by a few other Fortran compilers as a valid
format for input as well as for output. The character string edit
descriptor "J=" is interpreted as if it had been 2X on input, causing
two characters to be skipped over. The skipped characters don't have to
match the characters in the literal string. An optional warning is
emitted under control of the -pedantic option.
2025-05-28 13:58:22 -07:00
Sebastian Pop
d36028120a
[flang] add -floop-interchange and enable it with opt levels (#140182)
Enable the use of -floop-interchange from the flang driver.
Enable in flang LLVM's loop interchange at levels -O2, -O3, -Ofast, and -Os.
2025-05-21 08:27:39 -05:00
Peter Klausler
b7e13ab429
[flang][docs] Document technique for regenerating a module hermetically (#139975)
A flang-new module file is Fortran source, so it can be recompiled with
the `-fhermetic-module-files` option to convert it into a hermetic one.
2025-05-15 11:26:21 -07:00
Peter Klausler
e75fda107d
[flang] Acknowledge non-enforcement of C7108 (#139169)
Fortran 2023 constraint C7108 prohibits the use of a structure
constructor in a way that is ambiguous with a generic function reference
(intrinsic or user-defined). Sadly, no Fortran compiler implements this
constraint, and the common portable interpretation seems to be the
generic resolution, not the structure constructor.

Restructure the processing of structure constructors in expression
analysis so that it can be driven both from the parse tree as well as
from generic resolution, and then use it to detect ambigous structure
constructor / generic function cases, so that a portability warning can
be issued. And document this as a new intentional violation of the
standard in Extensions.md.

Fixes https://github.com/llvm/llvm-project/issues/138807.
2025-05-13 07:48:30 -07:00
NimishMishra
7aed77ef95
[flang][OpenMP] Add implicit casts for omp.atomic.capture (#138163)
This patch adds support for emitting implicit casts for atomic capture
if its constituent operations have different yet compatible types.

Fixes: https://github.com/llvm/llvm-project/issues/138123 and
https://github.com/llvm/llvm-project/issues/94177
2025-05-09 09:25:21 -07:00
Tom Eccles
3ed158fab4
[flang][docs][OpenMP] array sections with DEPEND are supported (#139081)
This was added in
- https://github.com/llvm/llvm-project/pull/132230
- https://github.com/llvm/llvm-project/pull/132994
- https://github.com/llvm/llvm-project/pull/133892
2025-05-08 15:13:04 +01:00
Tom Eccles
e40200901c
[mlir][OpenMP] cancel(lation point) taskgroup LLVMIR (#137841)
A cancel or cancellation point for taskgroup is always nested inside of
a task inside of the taskgroup. For the task which is cancelled, it is
that task which needs to be cleaned up: not the owning taskgroup.
Therefore the cancellation branch handler is done in the conversion of
the task not in conversion of taskgroup.

I added a firstprivate clause to the test for cancel taskgroup to
demonstrate that the block being branched to is the same block where
mandatory cleanup code is added. Cancellation point follows exactly the
same code path.
2025-05-08 11:15:58 +01:00
Tom Eccles
75e5643abf
[flang][OpenMP] share global variable initialization code (#138672)
Fixes #108136

In #108136 (the new testcase), flang was missing the length parameter
required for the variable length string when boxing the global variable.
The code that is initializing global variables for OpenMP did not
support types with length parameters.

Instead of duplicating this initialization logic in OpenMP, I decided to
use the exact same initialization as is used in the base language
because this will already be well tested and will be updated for any new
types. The difference for OpenMP is that the global variables will be
zero initialized instead of left undefined.

Previously `Fortran::lower::createGlobalInitialization` was used to
share a smaller amount of the logic with the base language lowering. I
think this bug has demonstrated that helper was too low level to be
helpful, and it was only used in OpenMP so I have made it static inside
of ConvertVariable.cpp.
2025-05-07 10:18:13 +01:00
Asher Mancinelli
8870ce1aa0
[flang][docs] Add note about Cray pointers and the TARGET attribute (#137993)
We found some tests checking for loops assigning between Cray pointer
handles and their pointees which produced "incorrect" results with
optimizations enabled; this is because the compiler expects Cray
pointers not to alias with any other entity.

[The HPE documentation for Cray Fortran extensions
specifies:](https://support.hpe.com/hpesc/public/docDisplay?docId=a00113911en_us&docLocale=en_US&page=Types.html#cray-poiter-type)

> the compiler assumes that the storage of a pointee is
> never overlaid on the storage of another variable

Jean pointed out that if a user's code uses entities that alias via Cray
pointers, they may add the TARGET attribute to inform Flang of this
aliasing, but that Flang's behavior is in line with Cray's own
documentation and we should not make any changes to our alias analysis
to try and detect this case.

Updating documentation so that users that encounter this situation have
a way to allow their code to compile as they intend.
2025-05-05 08:32:08 -07:00
Asher Mancinelli
8836bce842
[flang] Add lowering of volatile references (#132486)
[RFC on
discourse](https://discourse.llvm.org/t/rfc-volatile-representation-in-flang/85404/1)

Flang currently lacks support for volatile variables. For some cases,
the compiler produces TODO error messages and others are ignored. Some
of our tests are like the example from _C.4 Clause 8 notes: The VOLATILE
attribute (8.5.20)_ and require volatile variables.

Prior commits:
```
c9ec1bc753b0 [flang] Handle volatility in lowering and codegen (#135311)
e42f8609858f [flang][nfc] Support volatility in Fir ops (#134858)
b2711e1526f9 [flang][nfc] Support volatile on ref, box, and class types (#134386)
```
2025-04-30 08:46:33 -07:00
Eugene Epshteyn
4def437cdc
[flang][NFC] Fixed a typo in Exensions.md (#137738)
Fixed a small typo regarding F'2023 15.5.2.5 paragraph number.
2025-04-28 20:34:17 -04:00
Yang Zaizhou
38078b222f
[flang][docs] Fix typo in array description (#135908)
@klausler I think there's an extra "can" here that should be changed to
"one"
2025-04-25 08:47:38 -07:00
cor3ntin
320ec7fa7f
[Documentation] Always use SVG for dot-generated doxygen images. (#136843)
Despite our attempt (build-docs.sh)
to build the documentation with SVG,
it still uses PNG https://llvm.org/doxygen/classllvm_1_1StringRef.html,

and that renders terribly on any high dpi display.

SVG leads to smasller installation and works fine
on all browser (that has been true for _a while_
https://caniuse.com/svg), so this patch just unconditionally build all
dot graphs as SVG in all subprojects and remove the option.
2025-04-25 14:13:17 +02:00
Kiran Chandramohan
45a3056a4b
[Flang] Add a Fortran Standards Support doc (#132195) 2025-04-24 08:00:20 +01:00
Kiran Chandramohan
2c2ba7efd4
[Flang][OpenMP] Add OpenMP standards support doc (#132707) 2025-04-22 22:01:16 +01:00
Peter Klausler
46387cd184
[flang] Compile the output of -fdebug-unparse-with-modules (#135696)
The output of a compilation with the -fdebug-unparse-with-modules option
comprises its normal unparsed output along with the regenerated contents
of any modules that were required from module files. This is handy for
producing stand-alone test cases.

The modules' contents are generated by the same code that writes module
files, so they can contain some USE associations to private entities in
other modules that are necessary to complete local declarations, usually
initializers. Such USE associations to private entities are not flagged
as fatal errors when modules are read from module files, but they
currently are caught when the output produced by this option is being
read back in to the compiler.

Handle this case by softening the error to a warning when one module
uses a private entity from another with an alias containing the
non-conforming '$' character. (I could have omitted the message
altogether, but there are other valid warnings that will occur due to
undefined function result variables; further, I didn't want to provide a
general hole around the protection of private names.)
2025-04-18 12:48:55 -07:00
Andre Kuhlenschmidt
2e353a635b
[flang][openacc] Relax constraint on OpenACC declare statement (#135238)
OpenACC declare statements are restricted from having having clauses
that reference assumed size arrays. It should be the case that we can
implement `deviceptr` and `present` clauses for assumed-size arrays.
This is a first step towards relaxing this restriction.

Note running flang on the following example results in an error in
lowering.
```
$ cat t.f90
subroutine vadd (a, b, c, n)
   real(8) :: a(*), b(*), c(*)
!$acc declare deviceptr(a, b, c)
!$acc parallel loop
   do i = 1,n
      c(i) = a(i) + b(i)
   enddo
end subroutine

$ flang -fopenacc -c t.f90
error: loc("/home/akuhlenschmi/work/p4/ta/tests/openacc/src/t.f90":3:7): expect declare attribute on variable in declare operation
error: Lowering to LLVM IR failed
error: loc("/home/akuhlenschmi/work/p4/ta/tests/openacc/src/t.f90":4:7): unsupported OpenACC operation: acc.private.recipe
error: loc("/home/akuhlenschmi/work/p4/ta/tests/openacc/src/t.f90":4:7): LLVM Translation failed for operation: acc.private.recipe
error: failed to create the LLVM module
```

I would like to to share this code, because others are currently working
on the implementation of `deviceptr`, but it is obviously not running
end-to-end. I think the cleanest approach to this would be to put this
exception to the rule behind some feature flag, but I am not certain
what the precedence for that is.
2025-04-14 09:08:21 -07:00
Peter Klausler
9f7aac177c
[flang] Allow host-associated INTENT(OUT) in specification expr. (#135426)
Nearly, but not all, other compilers have a blanket prohibition against
the use of an INTENT(OUT) dummy argument in a specification expression.
Some compilers, however, permit an INTENT(OUT) dummy argument to appear
in a specification expression in a BLOCK construct or inner procedure
via host association.

The argument some have put forth to accept this usage comes from a
reading of 10.1.11 (specification expressions) in Fortran 2023 that, if
followed consistently, would also require host-associated OPTIONAL dummy
argument to be allowed. That would be dangerous for reasons that should
be obvious.

However, I can agree that a non-OPTIONAL dummy argument can't be assumed
to remain undefined on entry to a BLOCK construct or inner procedure, so
we can accept host-associated INTENT(OUT) in specification expressions
with a portability warning.
2025-04-14 09:00:12 -07:00
Peter Klausler
da6f493d4a
[flang][NFC] Update module file documentation (#135107)
The current module file documentation antedates the current
implementation of module files and contains many aspirational and
conditional statements, all of which can now be resolved with
descriptions of how things actually work.
2025-04-14 08:59:07 -07:00