[flang] Avoid infinite recursion in common block check
authorLeandro Lupori <leandro.lupori@linaro.org>
Thu, 2 Feb 2023 20:28:32 +0000 (20:28 +0000)
committerLeandro Lupori <leandro.lupori@linaro.org>
Mon, 13 Feb 2023 13:48:32 +0000 (10:48 -0300)
commit7eec2f2f218cd23a055dc81295c930a0674f5797
tree4f3a05ee7f95a58307c599b1bc909724c8d6bf58
parent87cc95a904e04d4d62f884c3937316cdf003c37d
[flang] Avoid infinite recursion in common block check

Don't call CheckCommonBlockDerivedType() recursively if the
derived type symbol is the same symbol that is already being
processed. This can happen when a component is a pointer of the
same type as its parent component, for instance.

Fixes #60230

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D143211
flang/lib/Semantics/resolve-names.cpp