[all-commits] [llvm/llvm-project] 142cbd: [flang] Fix TYPE/CLASS IS (T(...)) in SELECT TYPE

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Apr 14 16:20:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 142cbd500b1a635d8933e033b7a5fc5c5e0f04b3
      https://github.com/llvm/llvm-project/commit/142cbd500b1a635d8933e033b7a5fc5c5e0f04b3
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M flang/include/flang/Semantics/type.h
    M flang/lib/Semantics/check-select-type.cpp
    M flang/lib/Semantics/type.cpp
    M flang/test/Semantics/selecttype01.f90

  Log Message:
  -----------
  [flang] Fix TYPE/CLASS IS (T(...)) in SELECT TYPE

TYPE IS and CLASS IS guards in SELECT TYPE constructs are
allowed to specify the same type as the type of the selector
but f18's implementation of that predicate required strict
equality of the derived type representations.  We need to
allow for assumed values of LEN type parameters to match
explicit and deferred type parameter values in the selector
and require equality for KIND type parameters.  Implement
DerivedTypeSpec::Match() to perform this more relaxed type
comparison, and use it in check-select-type.cpp.

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




More information about the All-commits mailing list