[flang] Fix one regression failure related to BIND(C) statement
authorPeixinQiao <qiaopeixin@huawei.com>
Wed, 15 Jun 2022 13:10:36 +0000 (21:10 +0800)
committerPeixinQiao <qiaopeixin@huawei.com>
Wed, 15 Jun 2022 13:10:36 +0000 (21:10 +0800)
commit60e359943bfc22155cd239c9b40b3e4c41026915
tree07b13d6961a85e2eff067cd619de6aa60c6aba1e
parent9c8fe394cf6bcba6dbe643747d1eb2811734883b
[flang] Fix one regression failure related to BIND(C) statement

For BIND(C) statement, two common block with the same name can have the
same bind name. Fix the regression failure by adding this check. Also add
the regression tests.

Co-authored-by: Jean Perier <jperier@nvidia.com>
Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D127841
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/declarations03.f90