[all-commits] [llvm/llvm-project] 747211: [flang] Handle emboxing of a fir.ref<none> to an u...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Mon Jan 9 08:53:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 747211b7126532eaa8f31b37fd4f6a0110e51358
      https://github.com/llvm/llvm-project/commit/747211b7126532eaa8f31b37fd4f6a0110e51358
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/test/Fir/polymorphic.fir

  Log Message:
  -----------
  [flang] Handle emboxing of a fir.ref<none> to an unlimited polymorphic box

When an array element is extracted from an unlimited polymorphic array, the
emboxing of this element has to retrive the type code and element size from
the initial array. This patch retrive this information through the extracted
type descriptor.

This situation can be found in code like:

```
subroutine sub1(a)
  class(*) :: a(:)
  select type (x=>a(1))
  type is (integer)
    x = 10
  end select
end subroutine
```

Reviewed By: jeanPerier, PeteSteinfeld

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




More information about the All-commits mailing list