[flang] Fix bug determining type of statement entity
authorTim Keith <tkeith@nvidia.com>
Fri, 22 Feb 2019 23:56:39 +0000 (15:56 -0800)
committerGitHub <noreply@github.com>
Thu, 28 Feb 2019 18:38:17 +0000 (10:38 -0800)
commit1ec4ec88bf8265fe15b93e9a074c70221f87c6a3
tree5dce98abf2374d511197e9fb776e42e56f395c6c
parentf1bcb921807248edca18831a4d8204a1479733c3
[flang] Fix bug determining type of statement entity

A statement entity (`data-i-do-variable` or `ac-do-variable`) that
doesn't have a type specified gets the type it would have in the
enclosing scope. That means if there is a visible variable with the
same name, the statement entity gets its type. We were failing to
do that and just applying the implicit rules.

Original-commit: flang-compiler/f18@72bc7c29ba8d4be6a7c93080bb7fac7a3bc73577
Reviewed-on: https://github.com/flang-compiler/f18/pull/305
Tree-same-pre-rewrite: false
flang/lib/semantics/resolve-names.cc
flang/test/semantics/resolve30.f90
flang/test/semantics/symbol05.f90