[flang] Use PointerAssociateLowerBounds when there is lower bounds
authorValentin Clement <clementval@gmail.com>
Tue, 7 Feb 2023 08:15:54 +0000 (09:15 +0100)
committerValentin Clement <clementval@gmail.com>
Tue, 7 Feb 2023 08:17:38 +0000 (09:17 +0100)
commitdda01632db12d3b11d8e2e21d73d438626cb0436
tree610e0396ff65c836b7de8978e627170b2648fdc2
parentb4d51eafc4660ed48b42b6be999a647cc1163a16
[flang] Use PointerAssociateLowerBounds when there is lower bounds

The current code was not taking provided lower bounds when the pointer
is polymorphic and was just calling PointerAssociate. This patch
updates the behavior and use PointerAssociateLowerBounds with the provided
lower bounds.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D143392
flang/include/flang/Lower/Runtime.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/Runtime.cpp
flang/test/Lower/polymorphic.f90