[all-commits] [llvm/llvm-project] 839435: [flang] Fix fir::isPolymorphic for TYPE(*) assumed...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Jan 9 03:23:35 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 839435cc6ccbd84fff20790285af84bdba83778a
      https://github.com/llvm/llvm-project/commit/839435cc6ccbd84fff20790285af84bdba83778a
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-01-09 (Tue, 09 Jan 2024)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIRType.h
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    A flang/test/Lower/HLFIR/calls-poly-to-assumed-type.f90
    M flang/test/Lower/polymorphic.f90

  Log Message:
  -----------
  [flang] Fix fir::isPolymorphic for TYPE(*) assumed-size arrays (#77339)

fir::isPolymorphic was returning false for TYPE(*) assumed-size arrays
causing bad fir.rebox to be created when passing a polymorphic actual
argument to such TYPE(*) dummy.

Fix fir::isAssumedSize to return true for fir.ref<fir.array<none>> and
fir.ref<none>.

@cabreraam, I found this bug when testing your patch, although it is not
caused by it, so you may hit it when passing TYPE(*) deferred shape of
to assumed size TYPE(*) with a different rank.




More information about the All-commits mailing list