[all-commits] [llvm/llvm-project] 452d7e: [flang] Ensure that intrinsic procedures are PURE ...

Peter Klausler via All-commits all-commits at lists.llvm.org
Wed Feb 17 11:31:58 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 452d7ebc093a5f1434d2c616beb4a9fac6dc9783
      https://github.com/llvm/llvm-project/commit/452d7ebc093a5f1434d2c616beb4a9fac6dc9783
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2021-02-17 (Wed, 17 Feb 2021)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Semantics/call11.f90
    M flang/test/Semantics/doconcurrent01.f90
    M flang/test/Semantics/omp-symbol08.f90
    M flang/test/Semantics/procinterface01.f90
    M flang/test/Semantics/symbol13.f90
    M flang/test/Semantics/symbol14.f90
    M flang/test/Semantics/symbol15.f90
    M flang/test/Semantics/symbol17.f90
    M flang/test/Semantics/symbol18.f90
    M flang/test/Semantics/symbol19.f90

  Log Message:
  -----------
  [flang] Ensure that intrinsic procedures are PURE &/or ELEMENTAL

The intrinsic procedure table properly classify the various
intrinsics, but the PURE and ELEMENTAL attributes that these
classifications imply don't always make it to the utility
predicates that test symbols for them, leading to spurious
error messages in some contexts.  So set those attribute flags
as appropriate in name resolution, using a new function to
isolate the tests.

An alternate solution, in which the predicates would query
the intrinsic procedure table for these attributes on demand,
was something I also tried, so that this information could
come directly from an authoritative source; but it would have
required references to the intrinsic table to be passed along
on too many seemingly unrelated APIs and ended up looking messy.

Several symbol table tests needed to have their expected outputs
augmented with the PURE and ELEMENTAL flags.  Some bogus messages
that were flagged as such in test/Semantics/doconcurrent01.f90 were
removed, since they are now correctly not emitted.

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




More information about the All-commits mailing list