Don't set the INTRINSIC attribute on a dummy procedure.
Differential Revision: https://reviews.llvm.org/D85136
// error was reported
} else {
symbol = &Resolve(name, symbol)->GetUltimate();
- if (ConvertToProcEntity(*symbol) && IsIntrinsic(symbol->name())) {
+ if (ConvertToProcEntity(*symbol) && IsIntrinsic(symbol->name()) &&
+ !IsDummy(*symbol)) {
symbol->attrs().set(Attr::INTRINSIC);
// 8.2(3): ignore type from intrinsic in type-declaration-stmt
symbol->get<ProcEntityDetails>().set_interface(ProcInterface{});
!REF: /p1/x
y = f(x)
end program
+
+!DEF: /f2 (Function) Subprogram REAL(4)
+!DEF: /f2/cos EXTERNAL (Function, Implicit) ProcEntity REAL(4)
+!DEF: /f2/x (Implicit) ObjectEntity REAL(4)
+function f2(cos, x)
+ !DEF: /f2/f2 (Implicit) ObjectEntity REAL(4)
+ !REF: /f2/cos
+ !REF: /f2/x
+ f2 = cos(x)
+end function