MODULE Shared
  USE, INTRINSIC :: ISO_Fortran_env, dp=>REAL64 !modern DOUBLE PRECISION
  IMPLICIT NONE
  INTEGER ::
  INTEGER, DIMENSION(:) ::
  INTEGER, DIMENSION(:), ALLOCATABLE ::
  INTEGER, PARAMETER ::
  REAL(dp) ::
  REAL(dp), DIMENSION() ::
  REAL(dp), DIMENSION(:), ALLOCATABLE ::
  REAL(dp), PARAMETER ::
  CHARACTER(LEN=1) ::
  CHARACTER(*), PARAMETER ::
  TYPE My_Type
    REAL(dp) ::
  END TYPE My_Type
END MODULE Shared

PROGRAM My_Program
  USE Shared, ONLY :
  IMPLICIT NONE
  INTEGER ::
  REAL(dp) ::
  TYPE(My_Type) ::
  !program code
END PROGRAM My_Program

REAL(dp) FUNCTION My_Function()
  USE Shared, ONLY :
  IMPLICIT NONE
  INTEGER ::
  REAL(dp) ::
  TYPE(My_Type) ::
  !function code
END FUNCTION My_Function

SUBROUTINE My_Subroutine()
  USE Shared, ONLY :
  IMPLICIT NONE
  INTEGER, INTENT(IN) ::
  INTEGER, INTENT(OUT) ::
  INTEGER, INTENT(IN OUT) ::
  REAL(dp), INTENT(IN) ::
  REAL(dp), INTENT(OUT) ::
  REAL(dp), INTENT(IN OUT) ::
  TYPE(My_Type), INTENT(IN) ::
  TYPE(My_Type), INTENT(OUT) ::
  TYPE(My_Type), INTENT(IN OUT) ::
  !subroutine code
END SUBROUTINE My_Subroutine