[all-commits] [llvm/llvm-project] 37180e: [flang] Turn "error" cases into warning for "indis...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jan 29 14:36:49 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37180ed7435d28282ff4ccc9fbcbed04124ef8c0
      https://github.com/llvm/llvm-project/commit/37180ed7435d28282ff4ccc9fbcbed04124ef8c0
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/include/flang/Common/Fortran-features.h
    M flang/lib/Semantics/check-declarations.cpp
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/test/Semantics/generic05.F90
    M flang/test/Semantics/generic07.f90
    M flang/test/Semantics/resolve17.f90
    M flang/test/Semantics/resolve53.f90
    M flang/test/Semantics/resolve54.f90
    M flang/test/Semantics/resolve63.f90
    M flang/test/Semantics/resolve65.f90
    M flang/test/Semantics/resolve96.f90

  Log Message:
  -----------
  [flang] Turn "error" cases into warning for "indistinguishable" specific procedures (#79621)

When a generic procedure interface, either declared or the result of
    merging two use-associated generics, has two specific procedures
    that are not distinguishable according to the rules in F'2023
    subclause 15.4.3.4.5, emit a portability warning rather than a
    hard error message.  The rules in that subclause are not adequate
    to detect pairs of specific procedures that admit an ambiguous
    reference, as demonstrated by a case that arose in pFUnit.  Further,
    these distinguishability checks, even if sufficient to the task
    of detecting pairs of specifics capable of ambiguous references,
    should only apply to pairs where *every* reference would have to
    be ambiguous -- and this can and is validated at every reference
    anyway.  Last, only XLF enforces these incomplete and needless
    distinguishability rules -- every other compiler seems to just
    check that each procedure reference resolves to exactly one
    specific procedure.
    
    If the standard were to complete lose subclause 15.4.3.4.5 and
    its related note (C.11.6) -- which admits that the rules are
    incomplete! -- and simply require that each generic procedure
    reference resolve unambiguously to exactly one specific, nobody
    would miss them.  This patch changes this compiler to give them
    lip service when requested, but they are now otherwise ignored.




More information about the All-commits mailing list