[all-commits] [llvm/llvm-project] 4f1194: [flang] Allow implicit procedure pointers to assoc...

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Mon Nov 15 09:51:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4f11944652dec790c56e029d9a207db284831479
      https://github.com/llvm/llvm-project/commit/4f11944652dec790c56e029d9a207db284831479
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2021-11-15 (Mon, 15 Nov 2021)

  Changed paths:
    M flang/lib/Evaluate/characteristics.cpp
    M flang/lib/Evaluate/tools.cpp
    M flang/test/Semantics/assign03.f90
    M flang/test/Semantics/associated.f90

  Log Message:
  -----------
  [flang] Allow implicit procedure pointers to associate with explicit procedures

Section 10.2.2.4, paragraph 3 states that, for procedure pointer assignment:
  If the pointer object has an explicit interface, its characteristics shall be
  the same as the pointer target ...

Thus, it's illegal for a procedure pointer with an explicit interface to be
associated with a procedure whose interface is implicit.  However, there's no
prohibition that disallows a procedure pointer with an implicit interface from
being associated with a procedure whose interface is explicit.

We were incorrectly emitting an error message for this latter case.

We were also not covering the case of procedures with explicit
interfaces where calling them requires the use of a descriptor.  Such
procedures cannot be associated with procedure pointers with implicit
interfaces.

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




More information about the All-commits mailing list