[all-commits] [llvm/llvm-project] 67f9b5: [flang] Fix issue with lookup in the binding table...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Tue Dec 5 08:59:53 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a
https://github.com/llvm/llvm-project/commit/67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a
Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M flang/include/flang/Lower/ConvertExprToHLFIR.h
M flang/lib/Lower/CallInterface.cpp
M flang/lib/Lower/ConvertCall.cpp
M flang/lib/Lower/ConvertExprToHLFIR.cpp
M flang/test/Fir/dispatch.f90
M flang/test/Lower/allocatable-polymorphic.f90
M flang/test/Lower/dispatch.f90
M flang/test/Lower/nullify-polymorphic.f90
Log Message:
-----------
[flang] Fix issue with lookup in the binding table (#74416)
This patch is fixing two issue relative to the dynamic dispatch for
polymorphic entities.
1. Fix the `requireDispatchCall` function. It was checking for the first
symbol of the component but this is not the one to be checked. Instead
the last symbol of the base of the component object is the one to check
to know if it is polymorphic object with a dispatch call or not. This is
demonstrated in the new added test in `flang/test/Lower/dispatch.f90`
where the first symbol would point to `q` which is monomorphic and would
result in a simple `fir.call`
2. Fix the pass object in a no pass situation. In a no pass situation
the pass object is lowered anyway to be able to do the lookup in the
binding table. It was previously lowered wrongly an lead to unresolved
lookup. The base of the component is the passed object and should be
lowered. To achieve this, the `gen(DataRef)` entry point is exposed form
`ConvertExprToHLFIR` through a `convertDataRefToValue` function. The
same test added in `flang/test/Lower/dispatch.f90` is checking for the
correct passed object.
In addition couple of tests were updated to HLFIR since the lowering
used only works with it.
More information about the All-commits
mailing list