[all-commits] [llvm/llvm-project] ce5edf: [flang] Finer error detection in separate module p...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Oct 7 13:17:31 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce5edfd232c38ec4e4642b15cdb4dd8ecf105b04
      https://github.com/llvm/llvm-project/commit/ce5edfd232c38ec4e4642b15cdb4dd8ecf105b04
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2024-10-07 (Mon, 07 Oct 2024)

  Changed paths:
    M flang/include/flang/Common/Fortran-features.h
    M flang/lib/Semantics/check-declarations.cpp
    M flang/test/Semantics/separate-mp02.f90

  Log Message:
  -----------
  [flang] Finer error detection in separate module procedure case (#110912)

When a separate module procedure has a dummy procedure argument that is
simply declared EXTERNAL in its interface but is actually called as a
subroutine or function in its definition, the compiler is emitting an
error message. This is too strong; an error is appropriate only when the
dummy procedure in the definition has an interface that is incompatible
with the one in the interface definition.

However, this is not a safe coding practice, and can lead to trouble
during execution if a function is passed as an actual argument but
called as a subroutine in the procedure (or the other way around), so
add a warning message as well for this case (off by default).

Fixes https://github.com/llvm/llvm-project/issues/110797.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list