Hi Steve,
The attached patch has been tested on x86_64-*-freebsd. PR fortran/77960 uses a procedure pointer to expose the bug, but it applied to any external subprogram. So, the patch checks for the external attribute. OK to commit?
OK, and thanks. Regards Thomas