[flang] Fix potential null scope when lowering dispatch table op
authorValentin Clement <clementval@gmail.com>
Fri, 3 Feb 2023 09:16:54 +0000 (10:16 +0100)
committerValentin Clement <clementval@gmail.com>
Fri, 3 Feb 2023 09:17:33 +0000 (10:17 +0100)
commit6ada493035efcd1e90e8e062595c478babe7cd18
tree7f85446151a639d4ae6cb65c99c54a783d527f6a
parentc0fc1a118c1c0afced2b972774349ea11614dc4d
[flang] Fix potential null scope when lowering dispatch table op

Similary to D140209, the scope might need to be retrieved
from the typeSymbol. The test code was crashing because the
scope passed to CollectBindings was initially null.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D143188
flang/lib/Lower/Bridge.cpp
flang/test/Lower/dispatch.f90