[flang] MERGE result is polymorphic only if TSOURCE and FSOURCE are polymorphic
authorValentin Clement <clementval@gmail.com>
Wed, 1 Mar 2023 14:43:34 +0000 (15:43 +0100)
committerValentin Clement <clementval@gmail.com>
Wed, 1 Mar 2023 14:46:14 +0000 (15:46 +0100)
commited05dcc57bf9eb9efb44605ee97d7ba4b736e183
treebd5d49fde77cb7830439fbc08a1b15e96b1d8271
parent3eceab95f314edb85ee72c047a4acd35e757d037
[flang] MERGE result is polymorphic only if TSOURCE and FSOURCE are polymorphic

16.9.129 point 4: the result is polymorphic if and only if both TSOURCE and
FSOURCE are polymorphic.

If neither TSOURCE and FSOURCE are polymorphic then the current behavior is
preserved.

Depends on D145058

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D145060
flang/lib/Optimizer/Builder/IntrinsicCall.cpp
flang/test/Lower/polymorphic-temp.f90