[all-commits] [llvm/llvm-project] 08c7d5: [flang] Add options to control IMPLICIT NONE

Tim Keith via All-commits all-commits at lists.llvm.org
Thu Aug 6 06:48:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 08c7d570d30bb9568fb2219db7b1b8a9532559dd
      https://github.com/llvm/llvm-project/commit/08c7d570d30bb9568fb2219db7b1b8a9532559dd
  Author: Tim Keith <tkeith at nvidia.com>
  Date:   2020-08-06 (Thu, 06 Aug 2020)

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

  Log Message:
  -----------
  [flang] Add options to control IMPLICIT NONE

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
```

Differential Revision: https://reviews.llvm.org/D85363




More information about the All-commits mailing list