[all-commits] [llvm/llvm-project] 41b5f3: [flang] Warn about violations of an obscure requir...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Mar 2 09:42:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41b5f37185503b1c242cd8fd0295e723f44fac2e
      https://github.com/llvm/llvm-project/commit/41b5f37185503b1c242cd8fd0295e723f44fac2e
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/lib/Semantics/check-declarations.cpp
    M flang/test/Semantics/stmt-func01.f90

  Log Message:
  -----------
  [flang] Warn about violations of an obscure requirement (15.6.4 p2)

The Fortran 2018 standard, perhaps as an attempt to prevent ambiguity
in  older compilers, requires that a statement function appear in an
explicit type declaration statement if its name is also accessible
from a host scope.  F18 processes the specification parts of inner
procedures first, so we don't need this requirement to prevent
ambiguity, and can only really check it retrospectively after name
resolution.  Emit a portability warning when appropriate.

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




More information about the All-commits mailing list