[flang] Add TODO for polymorphic array argument in elemental procedure
authorJean Perier <jperier@nvidia.com>
Thu, 13 Apr 2023 06:22:50 +0000 (08:22 +0200)
committerJean Perier <jperier@nvidia.com>
Thu, 13 Apr 2023 06:23:20 +0000 (08:23 +0200)
commit91b1861dbfb5dafdb4d42fa650db6f1f824b6622
treee0c4d3551696830cded2b3688558f78d79f13049
parentb356cd70a27dd5be2cbcc72e9f1ac56f1fb788cb
[flang] Add TODO for polymorphic array argument in elemental procedure

The current lowering fails to retrieve the shape of polymorphic array
arguments in elemental procedure reference.
Add a TODO because this is supported in the new HLFIR lowering, and
because the current lowering anyway attempts to re-evaluate the
argument to get its shape, which is not correct if the evaluation
has side effects.

Add a test to ensure this is supported with HLFIR.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D148087
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/HLFIR/elemental-user-procedure-ref-polymorphic.f90 [new file with mode: 0644]