[all-commits] [llvm/llvm-project] 39f4ec: [flang] Catch a dangerous ambiguity in standard Fo...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Oct 16 15:40:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39f4ec5854a1ca34c70343c3ed1648a6be5b6b82
      https://github.com/llvm/llvm-project/commit/39f4ec5854a1ca34c70343c3ed1648a6be5b6b82
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2023-10-16 (Mon, 16 Oct 2023)

  Changed paths:
    M flang/docs/Extensions.md
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/resolve29.f90

  Log Message:
  -----------
  [flang] Catch a dangerous ambiguity in standard Fortran (#67483)

Fortran allows forward references to type names, which can lead to
ambiguity when coupled with host association, as in:

  module m
    type ambiguous; integer n; end type
   contains
    subroutine s
      type(ambiguous), pointer :: variable
      type t
        type(ambiguous), pointer :: component
      end type
      type ambiguous; real x; end type
    end
  end

Some other compilers resolve to a host association, some resolve to a
forward reference. This compiler will now emit an error.




More information about the All-commits mailing list