[flang-commits] [PATCH] D123713: [flang] Correct interaction between generics and intrinsics

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Apr 13 12:40:39 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.

Fortran allows a generic interface to have he same name as an
intrinsic procedure.  If the intrinsic is explicitly marked with
the INTRINSIC attribute, restrictions apply (C848) - the generic
must contain only functions or subroutines, depending on the
intrinsic.  Explicit or not, the generic overrides the intrinsic,
but the intrinsic behavior must still be available for calls
whose actual arguments do not match any of the specific procedures.

Semantics was not checking constraint C848, and it didn't allow
an explicit INTRINSIC attribute on a name of a generic interface.


https://reviews.llvm.org/D123713

Files:
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/resolve109.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123713.422604.patch
Type: text/x-patch
Size: 9701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220413/093985c3/attachment-0001.bin>


More information about the flang-commits mailing list