[flang] Fix an assert on duplicate initializations
authorPeter Steinfeld <psteinfeld@nvidia.com>
Thu, 30 Jul 2020 17:51:44 +0000 (10:51 -0700)
committerPeter Steinfeld <psteinfeld@nvidia.com>
Thu, 30 Jul 2020 19:58:28 +0000 (12:58 -0700)
commitfac84536bcb9fbca2b3517ca83d382329d0e6c55
tree6efdfa298c6ea95a88da0e237647c098042a288c
parentb4c7657ba602acde1c2ea5391c973949b9c3ce09
[flang] Fix an assert on duplicate initializations

When declaring the same variable twice with an initialization, we were failing
an internal check.  I fixed this by checking to see if the associated symbol
already had an error.

I added tests for pointer and non-pointer initialization of duplicate names.

Differential Revision: https://reviews.llvm.org/D84969
flang/lib/Semantics/resolve-names.cpp
flang/test/Semantics/resolve91.f90