[all-commits] [llvm/llvm-project] 8c1270: [flang] Fix issues with STORAGE_SIZE and character...

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Sep 27 23:59:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c1270740f6bf659e5fbf556c1145ddaa7aa5366
      https://github.com/llvm/llvm-project/commit/8c1270740f6bf659e5fbf556c1145ddaa7aa5366
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2023-09-28 (Thu, 28 Sep 2023)

  Changed paths:
    M flang/include/flang/Evaluate/call.h
    M flang/include/flang/Evaluate/type.h
    M flang/lib/Evaluate/type.cpp
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    A flang/test/Evaluate/rewrite06.f90
    A flang/test/Lower/Intrinsics/storage_size-2.f90
    M flang/test/Semantics/call05.f90

  Log Message:
  -----------
  [flang] Fix issues with STORAGE_SIZE and characters (#67561)

Semantics was replacing storage_size(func()) by the length specification
expression of func result (if any), which brought meaningless symbols.
Update FunctionRef::GetType to not copy its length parameter from the
procedure designator symbol if it is not a constant expression. Note
that the deferred aspect can and must be preserved because it matters
for POINTER function results (semantics test added to ensure this).

Update lowering code to deal with characters in storage_size: simply
always call createBox to ensure the BoxEleSizeOp is legal. This will
take care of dereferencing pointers/allocatables if needed (what the
load was intended for in the previous code).




More information about the All-commits mailing list