[flang] Add semantic check for named constant as function result
authorPeixin-Qiao <qiaopeixin@huawei.com>
Wed, 1 Jun 2022 06:38:46 +0000 (14:38 +0800)
committerPeixin-Qiao <qiaopeixin@huawei.com>
Wed, 1 Jun 2022 06:38:46 +0000 (14:38 +0800)
commit5491fdf559ec68039a218bab6bf41901611554f0
tree274d1ced644f3e84b5488596ec5236cb2d1370f1
parent3d56131bf6dd41449390ab551337540bbbe04402
[flang] Add semantic check for named constant as function result

Similar to procedure argument, the function result cannot be one
named constant.

Reviewed By: klausler

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