[all-commits] [llvm/llvm-project] 9168a0: [flang] Fix bogus message on index-names in the pr...

Pete Steinfeld via All-commits all-commits at lists.llvm.org
Thu Dec 10 07:42:17 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9168a0f515c908dc3c3df822f17d489ec8a0caf2
      https://github.com/llvm/llvm-project/commit/9168a0f515c908dc3c3df822f17d489ec8a0caf2
  Author: Peter Steinfeld <psteinfeld at nvidia.com>
  Date:   2020-12-10 (Thu, 10 Dec 2020)

  Changed paths:
    M flang/include/flang/Evaluate/tools.h
    M flang/lib/Evaluate/tools.cpp
    M flang/lib/Semantics/resolve-names.cpp
    A flang/test/Semantics/resolve99.f90

  Log Message:
  -----------
  [flang] Fix bogus message on index-names in the presence of associated entities

The semantic analysis of index-names of FORALL statements looks up symbols with
the same name as the index-name.  This is needed to exclude symbols that are
not objects.  But if the symbol found is host-, use-, or construct-associated
with another entity, the check fails.

I fixed this by getting the root symbol of the symbol found and doing the check
on the root symbol.  This required creating a non-const version of
"GetAssociationRoot()".

Differential Revision: https://reviews.llvm.org/D92970




More information about the All-commits mailing list