Compile-time error extending fortran type in nvfortran

Encountered a compiled time error extending types in Fortran with pgf90 version:

pgf90 (aka nvfortran) 21.1-0 LLVM 64-bit target on x86-64 Linux -tp sandybridge
PGI Compilers and Tools
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.

Here is a reproducer (also attached as .txt file):

% 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
%

bug-report.txt (1.4 KB)

Thanks John. I filed a problem report, TPR #30553, and sent it to engineering for investigation.

1 Like

Hi John,

I was reviewing some older reports and noticed that I missed letting you know that this issue was fixed back in the 21.11 release. Apologies for the late update!

-Mat