complex 'matmul' function fails

Recently, I updated the PGI compiler version to 12.8 and started to get weird results from my program which worked fine with version 11.10. I’ve been trying to locate the source of error and think I got one. In the following code, it compiles fine, but gives segmentation fault when it is run.

program check
 implicit none
 integer :: i, n
 complex(kind=8), allocatable, dimension(:,:) :: a, b, c

 n = 24
 allocate(a(n,n), b(n,n), c(n,n))

 a = (1.0d0,1.0d0)
 b = (2.0d0,2.0d0)
 c = (3.0d0,3.0d0)

 c = matmul( a, b ) !OK
 c = matmul( b, dconjg(a) ) !Segfault (core dump)
 c = matmul( dconjg(b), a ) !Segfault (core dump)
 c = matmul( dconjg(a), dconjg(b) ) !Segfault (core dump)


The code basically do a series of complex matrix multiplications and it seems that whenever some intrinsic functions (e.g., dconjg, transpose etc) appear inside matmul parentheses it gives out segfault.

The code runs fine in other compilers. Also, when the allocatable arrays are exchanged to explicit shape arrays the code works fine too.

Hi dux,

Thanks for the report. This is a known issue that will be resolved in our upcoming 12.9 release.

% pgf90 mm_complex.f90 -V12.8
% a.out
Segmentation fault
% pgf90 mm_complex.f90 -V12.9
% a.out

Best Regards,