[flang-commits] [PATCH] D130386: [flang] Allow restricted specific intrinsic functions as implicitly-interfaced procedure pointer targets

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jul 22 12:23:51 PDT 2022


klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
Herald added a project: All.
klausler requested review of this revision.

The predicate "CanBeCalledViaImplicitInterface()" was returning false for
restricted specific intrinsic functions (e.g., SIN) because their procedure
characteristics have the elemental attribute; this leads to a bogus semantic
error when one attempts to use them as proc-targets in procedure pointer
assignment statements when the left-hand side of the assignment is a procedure
pointer with an implicit interface.  However, these restricted specific intrinsic
functions have always been allowed as special cases for such usage -- it is
as if they are elemental when it is necessary for them to be so, but not
when it's a problem.


https://reviews.llvm.org/D130386

Files:
  flang/include/flang/Evaluate/characteristics.h
  flang/include/flang/Evaluate/tools.h
  flang/lib/Evaluate/characteristics.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/lib/Evaluate/tools.cpp
  flang/lib/Semantics/check-call.cpp
  flang/lib/Semantics/pointer-assignment.cpp
  flang/test/Semantics/assign03.f90
  flang/test/Semantics/assign09.f90
  flang/test/Semantics/associated.f90
  flang/test/Semantics/c_f_pointer.f90
  flang/test/Semantics/call03.f90
  flang/test/Semantics/procinterface02.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130386.446933.patch
Type: text/x-patch
Size: 24580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220722/7c80cfb6/attachment-0001.bin>


More information about the flang-commits mailing list