[all-commits] [llvm/llvm-project] 9379ca: [flang] Fix associating entity when selector is an...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Thu Dec 15 03:02:53 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9379ca0a257780961a7e77c1a56c70d00cd85909
      https://github.com/llvm/llvm-project/commit/9379ca0a257780961a7e77c1a56c70d00cd85909
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIROps.td
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    M flang/test/Lower/select-type.f90

  Log Message:
  -----------
  [flang] Fix associating entity when selector is an array, pointer or allocatable

In SELECT TYPE, within the block following TYPE IS, the associating entity is not polymorphic.
It has the type named in the type guard and other properties taken from the
selector. Within the block following a CLASS IS type guard statement, the
associating entity is polymorphic and has the declared type named in the type
guard statement.
This patch makes sure the associating entity matches the selector if it is
an array, a pointer or an allocatable.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list