[flang] Simpify parent component handling
authorValentin Clement <clementval@gmail.com>
Sun, 12 Mar 2023 19:23:58 +0000 (20:23 +0100)
committerValentin Clement <clementval@gmail.com>
Sun, 12 Mar 2023 19:24:24 +0000 (20:24 +0100)
commitfa77f579560e399c44f76360f75c09483c845a04
treef7249304af0e3e5b4a419cf15c22d5523dd51d92
parent7946e67cf3e30271d60c08490fd6cd93bd771fe8
[flang] Simpify parent component handling

This patch simplify the parent component handling when it's the last ref.

The first field is not necessary when the target box type is set correctly.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D145795
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/parent-component.f90
flang/test/Lower/polymorphic.f90