aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorValentin Clement (バレンタイン クレメン) <clementval@gmail.com>2023-12-05 08:59:40 -0800
committerGitHub <noreply@github.com>2023-12-05 08:59:40 -0800
commit67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a (patch)
treed81c3f3f27d395812c1d28de726caf444e4266a3 /llvm/utils/UpdateTestChecks/common.py
parent2a95d47ed53e959017c345860df80898699cefb5 (diff)
downloadllvm-67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a.zip
llvm-67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a.tar.gz
llvm-67f9b5ae7d7a256a547d97386d67e9a55fc3fe6a.tar.bz2
[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.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
0 files changed, 0 insertions, 0 deletions