[all-commits] [llvm/llvm-project] e75fda: [flang] Acknowledge non-enforcement of C7108 (#139...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue May 13 07:48:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e75fda107da8bd6a3993bf1e3cb51dc03e952e23
      https://github.com/llvm/llvm-project/commit/e75fda107da8bd6a3993bf1e3cb51dc03e952e23
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2025-05-13 (Tue, 13 May 2025)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/include/flang/Semantics/expression.h
    M flang/include/flang/Support/Fortran-features.h
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Support/Fortran-features.cpp
    A flang/test/Semantics/c7108.f90
    M flang/test/Semantics/generic09.f90
    M flang/test/Semantics/resolve11.f90
    M flang/test/Semantics/resolve17.f90
    M flang/test/Semantics/resolve18.f90

  Log Message:
  -----------
  [flang] Acknowledge non-enforcement of C7108 (#139169)

Fortran 2023 constraint C7108 prohibits the use of a structure
constructor in a way that is ambiguous with a generic function reference
(intrinsic or user-defined). Sadly, no Fortran compiler implements this
constraint, and the common portable interpretation seems to be the
generic resolution, not the structure constructor.

Restructure the processing of structure constructors in expression
analysis so that it can be driven both from the parse tree as well as
from generic resolution, and then use it to detect ambigous structure
constructor / generic function cases, so that a portability warning can
be issued. And document this as a new intentional violation of the
standard in Extensions.md.

Fixes https://github.com/llvm/llvm-project/issues/138807.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list