forked from OSchip/llvm-project
[flang] Allow IMPLICIT NONE(EXTERNAL) with GenericDetails
Restrictions of IMPLICIT NONE(EXTERNAL) prohibits usage of c_associated from iso_c_binding (with explicit interface) without external definiton - relax associated check. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D120971
This commit is contained in:
parent
35f48edb91
commit
d2bcb0a129
|
@ -6495,7 +6495,9 @@ void ResolveNamesVisitor::HandleProcedureName(
|
|||
if (!SetProcFlag(name, *symbol, flag)) {
|
||||
return; // reported error
|
||||
}
|
||||
CheckImplicitNoneExternal(name.source, *symbol);
|
||||
if (!symbol->has<GenericDetails>()) {
|
||||
CheckImplicitNoneExternal(name.source, *symbol);
|
||||
}
|
||||
if (symbol->has<SubprogramDetails>() &&
|
||||
symbol->attrs().test(Attr::ABSTRACT)) {
|
||||
Say(name, "Abstract interface '%s' may not be called"_err_en_US);
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
! RUN: %python %S/test_errors.py %s %flang_fc1
|
||||
use iso_c_binding, only: c_ptr, c_associated
|
||||
implicit none(external)
|
||||
type (c_ptr) :: cptr
|
||||
if (.not. c_associated (cptr)) then
|
||||
return
|
||||
end if
|
||||
end
|
Loading…
Reference in New Issue