[all-commits] [llvm/llvm-project] d03cd0: [flang] Propagate the BIND(C) attribute into proce...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Mon Jun 3 14:49:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d03cd05f077f92e87f354aca4cdea599b678b64e
https://github.com/llvm/llvm-project/commit/d03cd05f077f92e87f354aca4cdea599b678b64e
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2024-06-03 (Mon, 03 Jun 2024)
Changed paths:
M flang/lib/Semantics/resolve-names.cpp
M flang/test/Semantics/bind-c02.f90
A flang/test/Semantics/bind-c16.f90
Log Message:
-----------
[flang] Propagate the BIND(C) attribute into procedures from their in… (#93994)
…terfaces
In "PROCEDURE(iface) :: proc", if "iface" has the BIND(C) attribute,
then so should proc, as if the declaration had been "PROCEDURE(iface),
BIND(C) :: proc". This had been working in name resolution only in cases
where "iface" had been declared before "proc".
Note that if "iface" is declared with an empty binding name
("BIND(C,NAME='')"), "proc" does not inherit that property. Use an
explicit "BIND(C,NAME='')" on the "PROCEDURE" statement for that.
This behavior is not clearly defined in the standard, but seems to match
what some other Fortran compilers do.
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