[flang] Support BIND(C) variable scope check
authorPeixinQiao <qiaopeixin@huawei.com>
Tue, 31 May 2022 15:26:00 +0000 (23:26 +0800)
committerPeixinQiao <qiaopeixin@huawei.com>
Tue, 31 May 2022 15:26:00 +0000 (23:26 +0800)
commitf3d8335383672df3b3b950a082c2b11a80cbdb9d
treed65f9e66fe1c3699142df5a6c8e992777c49ce70
parent1257315b20d5f2487c4445c129b7437d5f2debfd
[flang] Support BIND(C) variable scope check

As Fortran 2018 C819, a variable with the BIND attribute shall be declared
in the specification part of a module. Add the support for this check.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D126653
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/resolve113.f90 [new file with mode: 0644]