There is a bug in the entire 12.x series of fortran compilers up to and including 12.8-1
which fails to compile one of the modules in our CASTEP electronic structure code.
Fortunately it has been easy to distil a simple testcase to demonstrate the problem.
Please will someone file a bug report for this.
The error returned is
$ pgf90 -V
pgf90 12.8-1 64-bit target on x86-64 Linux -tp nehalem
$ pgf90 -c lowering.f90
Lowering Error: symbol ip$sd is an inconsistent array descriptor
PGF90-F-0000-Internal compiler error. Errors in Lowering 1 (lowering.f90: 29)
module c
type u
integer nums
integer, dimension(:), allocatable :: numis
real, dimension(:,:), allocatable :: ip
end type u
integer :: num_cells
contains
subroutine ctest(cell, sc, scv)
implicit none
type(u), intent(in) :: cell
type(u), intent(inout) :: sc
real, dimension(:,:), intent(in) :: scv
real, dimension(3,3) :: scm
integer :: ni, nj
do ni=1,10
nj = ni
sc%ip(:,nj)= matmul(scm, cell%ip(:,ni) + scv(1,:))
end do
end subroutine ctest
end module c
Keith Refson