Hello. Here is a test Fortran program:
module regr12_conserv_m implicit none contains subroutine regr12_conserv(xt, vt) real, intent(in):: xt(:) real, intent(in):: vt(:) integer n2 n2 = 4 print *, mean_lin(3.) contains function mean_lin(a) real, intent(in):: a real mean_lin(n2) mean_lin = 1. end function mean_lin end subroutine regr12_conserv end module regr12_conserv_m
I am confident that this code is valid in Fortran 95. The internal function is array-valued. Its shape is explicit. Its size is given by a variable from the host program unit.
With the following version of pgfortran:
$ pgfortran -V
pgfortran 13.10-0 64-bit target on x86-64 Linux -tp istanbul
The Portland Group - PGI Compilers and Tools
Copyright © 2013, NVIDIA CORPORATION. All rights reserved.
here is the result of trying to compile this test code:
$ pgfortran -Mfree -c regr12_conserv.f
PGF90-F-0000-Internal compiler error. interf:new_symbol_and_link, symbol not found 608 (regr12_conserv.f: 8)
PGF90/x86-64 Linux 13.10-0: compilation aborted
Please note that there is no problem with the other compilers I have access to: ifort, nagfor, gfortran.
I think this is a bug of the compiler. Is it corrected in more recent versions of the compiler?