[flang] Simplify same_type_as condition
authorValentin Clement <clementval@gmail.com>
Thu, 9 Mar 2023 14:46:59 +0000 (15:46 +0100)
committerValentin Clement <clementval@gmail.com>
Thu, 9 Mar 2023 14:47:39 +0000 (15:47 +0100)
commit188c02daaa24a484507a5e20db475180e793ccfd
tree01532f5150d1c4d262852a63d44cf559843652f8
parent1a4d0eb866be909fe16da5ebffe4122aa0693d8c
[flang] Simplify same_type_as condition

Restore the behavior changed in D145384 and add proper
unit tests.

Unallocated unlimited poymorphic allocatable and disassociated
unlimited polymorphic pointer should return false.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D145674
flang/runtime/derived-api.cpp
flang/unittests/Runtime/Derived.cpp