The predicate "CanBeCalledViaImplicitInterface()" was returning false for
restricted specific intrinsic functions (e.g., SIN) because their procedure
characteristics have the elemental attribute; this leads to a bogus semantic
error when one attempts to use them as proc-targets in procedure pointer
assignment statements when the left-hand side of the assignment is a procedure
pointer with an implicit interface. However, these restricted specific intrinsic
functions have always been allowed as special cases for such usage -- it is
as if they are elemental when it is necessary for them to be so, but not
when it's a problem.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I am sorry the warning patch (D125804) is taking so long, I have not found much time to work with Flang lately. This patch causes a mismatch between emitted and expected warnings in associated.f90, line 141. Could you please have a look to see if the changed warning message is deliberate or not?
Comment Actions
Agree. Previously, the warning was about the dummy variable having incompatible attributes (intent(in) and value, respectively) for pointer and target. Now it is about the procedure being elemental when the pointer is not. Can you confirm this change is desired? Sorry if I was unclear.