diff --git a/src/fckit/module/fckit_refcount.F90 b/src/fckit/module/fckit_refcount.F90 index e878ab0..3542c9c 100644 --- a/src/fckit/module/fckit_refcount.F90 +++ b/src/fckit/module/fckit_refcount.F90 @@ -117,12 +117,10 @@ subroutine allocate_fckit_external(refcount,shared_ptr) FCKIT_SUPPRESS_UNUSED( shared_ptr ) end subroutine -#ifndef NAG -function fckit_external() result(funptr) +subroutine fckit_external (funptr) procedure(fckit_refcount_interface), pointer :: funptr funptr => allocate_fckit_external -end function -#endif +end subroutine fckit_external #if FCKIT_HAVE_ECKIT subroutine allocate_fckit_refcount_owned(refcount,shared_ptr) @@ -142,12 +140,10 @@ subroutine allocate_fckit_refcount_owned(refcount,shared_ptr) end select end subroutine -#ifndef NAG -function fckit_owned() result(funptr) +subroutine fckit_owned(funptr) procedure(fckit_refcount_interface), pointer :: funptr funptr => allocate_fckit_refcount_owned -end function -#endif +end subroutine fckit_owned #endif diff --git a/src/fckit/module/fckit_shared_ptr.F90 b/src/fckit/module/fckit_shared_ptr.F90 index 0529abd..31a8bf2 100644 --- a/src/fckit/module/fckit_shared_ptr.F90 +++ b/src/fckit/module/fckit_shared_ptr.F90 @@ -337,9 +337,7 @@ subroutine share( this, ptr, refcount ) if( present(refcount) ) then call c_f_procpointer( refcount, opt_refcount ) else -#ifndef NAG - opt_refcount => fckit_external() -#endif + call fckit_external(opt_refcount) endif this%shared_ptr_ => ptr this%is_null_ = .not. associated( this%shared_ptr_ )