[PATCH] D85363: [flang] Add options to control IMPLICIT NONE

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 14:17:17 PDT 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld, sscalpone.
tskeith added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
tskeith requested review of this revision.

Add `-fimplicit-none-type-always` to treat each specification-part
like it has `IMPLICIT NONE`. This is helpful for enforcing good Fortran
programming practices. We might consider something similar for
`IMPLICIT NONE(EXTERNAL)` as well.

Add `-fimplicit-none-type-never` to ignore occurrences of `IMPLICIT NONE`
and `IMPLICIT NONE(TYPE)`. This is to handle cases like the one below,
which violates the standard but it accepted by some compilers:

  subroutine s(a, n)
    implicit none
    real :: a(n)
    integer :: n
  end


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85363

Files:
  flang/documentation/Extensions.md
  flang/include/flang/Common/Fortran-features.h
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/implicit09.f90
  flang/test/Semantics/implicit10.f90
  flang/tools/f18/f18.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85363.283397.patch
Type: text/x-patch
Size: 6560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200805/a461d251/attachment.bin>


More information about the llvm-commits mailing list