Topic
  • No replies
lsuhpc
lsuhpc
1 Post

Pinned topic XL Fortran compiler internal error

‏2010-01-15T15:30:20Z |
Hi there,

I'm not sure if this is an appropriate thread for this forum. If not, please point me to the right place to post it.

I got this compiler internal error while trying to compile this Fortran code:

$ cat matmul.f90

program mat_mul
implicit real*8 (a-h,o-z)
dimension :: b(2,2),a(2,2),x(2,2)
a=0
b=matmul(a,x)
end program mat_mul

$ xlf90 -O0 -c matmul.f90
xlf90: 1501-230 (S) Internal compiler error; please contact your Service
Representative. For more information visit:
http://www.ibm.com/support/docview.wss?uid=swg21110810
1501-511 Compilation failed for file matmul.f90.

This error seems to be caused by the fact that values are assign to a before calling MATMUL while a is declared implicitly, as the two modified versions below work well:

program mat_mul
implicit real*8 (a-h,o-z)
! Declare the arrays explicitly.
real*8 :: b(2,2),a(2,2),x(2,2)
a=0
b=matmul(a,x)
end program mat_mul

program mat_mul
implicit real*8 (a-h,o-z)
dimension :: b(2,2),a(2,2),x(2,2)
! Do not assign value to a before calling MATMUL.
! a=0
b=matmul(a,x)
end program mat_mul

The version of XL Fortran that I'm using is 12.1.0.6, which I believe is the latest. The OS is AIX 5.3.

This looks like a compiler bug to me, but I might be wrong. I appreciate any help and/or insight that you could provide.

Cheers,
Le