[all-commits] [llvm/llvm-project] f6ded5: [flang] Handle CALL C_F_POINTER(without SHAPE=)

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Feb 15 10:58:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f6ded53fb03b377497661e5fcd7955bb65f90fd7
      https://github.com/llvm/llvm-project/commit/f6ded53fb03b377497661e5fcd7955bb65f90fd7
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-02-15 (Tue, 15 Feb 2022)

  Changed paths:
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Semantics/expression.cpp
    M flang/test/Semantics/c_f_pointer.f90

  Log Message:
  -----------
  [flang] Handle CALL C_F_POINTER(without SHAPE=)

Calls to C_F_POINTER() without the optional SHAPE= third argument
were failing to be recognized as proper calls to the intrinsic,
but the failure was not generating any error message.  This led to
a crash in lowering, which rightfully expects a typed expression
to be associated with the call.

So (1) catch silent failures to convert CALL statements as internal
errors, as is done for expressions and assignment statements; and
(2) clean up C_F_POINTER intrinsic handling to cope with only two
arguments and to emit an error for a FPTR= argument with no type.

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




More information about the All-commits mailing list