% cat repro.F90 module mod_my_model type :: my_model_t contains #ifdef FAIL private procedure, public :: step => step_my_model #endif end type my_model_t type, extends(my_model_t) :: my_adj_t contains procedure, public :: step => step_my_adj end type my_adj_t interface module subroutine step_my_adj( this, step_length, istat ) implicit none class ( my_adj_t ), intent(inout) :: this integer, intent(in), optional :: step_length integer, intent(out), optional :: istat end subroutine step_my_adj end interface contains subroutine step_my_model( this, step_length, istat ) implicit none class ( my_model_t ), intent(inout) :: this integer, intent(in), optional :: step_length integer, intent(out), optional :: istat end subroutine step_my_model end module mod_my_model % pgf90 -c repro.F90 % pgf90 -c -DFAIL repro.F90 /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc: error: /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc: /tmp/nvfortrannU0BNWU9OQKd.ll:8:75: error: use of undefined value '@step_my_adj_' @mod_my_model$$$my_adj_t$$$td$vft = global [1 x i8*] [i8* bitcast(void()* @step_my_adj_ to i8*)] ^ % ifort -c -DFAIL repro.F90 %