diff options
author | Peter Klausler <pklausler@nvidia.com> | 2023-03-03 11:43:55 -0800 |
---|---|---|
committer | Peter Klausler <pklausler@nvidia.com> | 2023-03-10 09:19:52 -0800 |
commit | d38765604f9372dab74a82b573302bd6401c6698 (patch) | |
tree | ecc31f0eb63dfeb90b1cb88f954dbbfdd21f50ad /flang/docs | |
parent | 30705e977061e437a337070fd6a21c7df2c62670 (diff) | |
download | llvm-d38765604f9372dab74a82b573302bd6401c6698.tar.gz |
[flang] Forward references to COMMON from specification expr under IMPLICIT NONE
As a near-universal extension, Fortran compilers permit forward references
to dummy arguments and variables in COMMON blocks from specification expressions
before an explicit type-declaration-stmt appears for those variables
under IMPLICIT NONE, so long as those variables are later explicitly typed
with the types that regular implicit typing rules would have given them
(usually default INTEGER).
F18 implemented this extension for dummy arguments, but not variables in
COMMON blocks. Extend the extension to also accept variables in COMMON.
Differential Revision: https://reviews.llvm.org/D145743
Diffstat (limited to 'flang/docs')
-rw-r--r-- | flang/docs/Extensions.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/flang/docs/Extensions.md b/flang/docs/Extensions.md index 7f685c72eada..a71363cb3b6e 100644 --- a/flang/docs/Extensions.md +++ b/flang/docs/Extensions.md @@ -199,10 +199,10 @@ end * DATA statement initialization is allowed for procedure pointers outside structure constructors. * Nonstandard intrinsic functions: ISNAN, SIZEOF -* A forward reference to a default INTEGER scalar dummy argument is - permitted to appear in a specification expression, such as an array - bound, in a scope with IMPLICIT NONE(TYPE) if the name - of the dummy argument would have caused it to be implicitly typed +* A forward reference to a default INTEGER scalar dummy argument or + `COMMON` block variable is permitted to appear in a specification + expression, such as an array bound, in a scope with IMPLICIT NONE(TYPE) + if the name of the variable would have caused it to be implicitly typed as default INTEGER if IMPLICIT NONE(TYPE) were absent. * OPEN(ACCESS='APPEND') is interpreted as OPEN(POSITION='APPEND') to ease porting from Sun Fortran. |