return; // reported error
}
CheckImplicitNoneExternal(name.source, *symbol);
- if (IsProcedure(*symbol) || symbol->has<DerivedTypeDetails>() ||
+ if (symbol->has<SubprogramDetails>() &&
+ symbol->attrs().test(Attr::ABSTRACT)) {
+ Say(name, "Abstract interface '%s' may not be called"_err_en_US);
+ } else if (IsProcedure(*symbol) || symbol->has<DerivedTypeDetails>() ||
symbol->has<ObjectEntityDetails>() ||
symbol->has<AssocEntityDetails>()) {
// Symbols with DerivedTypeDetails, ObjectEntityDetails and
procedure(proc), deferred :: p1
end type t1
+ abstract interface
+ function f()
+ end function
+ end interface
+
contains
subroutine bar
end subroutine
+ subroutine test
+ !ERROR: Abstract interface 'foo' may not be called
+ call foo()
+ !ERROR: Abstract interface 'f' may not be called
+ x = f()
+ end subroutine
end module