[flang] Fix bug resolving internal and module functions
authorTim Keith <tkeith@nvidia.com>
Wed, 17 Apr 2019 14:42:16 +0000 (07:42 -0700)
committerTim Keith <tkeith@nvidia.com>
Wed, 17 Apr 2019 14:42:16 +0000 (07:42 -0700)
commitfab062244bdc128d7e82e23c2cb9fc3976264c00
tree107eeb775dc7417398d03fe105457e4dad5bf02b
parente99ba0bc7daaa493a827639248e39200a73ed550
[flang] Fix bug resolving internal and module functions

When analyzing a function call in an expression we weren't properly
recognizing a ProcedureDesignator that was the name of an internal
or module function, i.e. a symbol with SubprogramDetails.

The fix is to add IsProcedure to identify symbols that correspond
to procedures. IsFunction and GetType also need to be extended to
handle this case.

Fixes flang-compiler/f18#391.

Original-commit: flang-compiler/f18@f165f8d38ce0cefd16e0f35644e8fdcbe92ed6de
Reviewed-on: https://github.com/flang-compiler/f18/pull/417
Tree-same-pre-rewrite: false
flang/lib/semantics/expression.cc
flang/lib/semantics/symbol.h
flang/lib/semantics/tools.cc
flang/lib/semantics/tools.h
flang/test/semantics/if_construct01.f90
flang/test/semantics/if_construct02.f90
flang/test/semantics/procinterface01.f90
flang/test/semantics/symbol01.f90