[all-commits] [llvm/llvm-project] c322e9: [flang] Silence bogus USE statement error (#79896)

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Jan 29 14:51:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c322e92841fae1d756c4126a3e4c5e1b3366f042
      https://github.com/llvm/llvm-project/commit/c322e92841fae1d756c4126a3e4c5e1b3366f042
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    A flang/test/Semantics/resolve122.f90

  Log Message:
  -----------
  [flang] Silence bogus USE statement error (#79896)

When there are multiple USE statement for a particular module using
renaming, it is necessary to collect a set of all of the original
renaming targets before processing any of USE statements that don't have
ONLY: clauses.

Currently, if there is a name in the module that can't be added to the
current scope -- due to a conflict with an internal or module
subprogram, or with a previously use-associated name -- the compiler
will emit a bogus error message even if that conflicting name appear on
a later USE statement of the same module as the target of a renaming.

The new regression test case added with this patch provides a motivating
example.




More information about the All-commits mailing list