A fix is available
APAR status
Closed as program error.
Error description
Runtime incorrect results with DIMENSION attribute for the below test case. ===== TESTCASE: >cat t.f90 program toto integer :: nspin, nkpts integer, allocatable, dimension(:,:) :: ndimovr double precision, allocatable, dimension(:) :: ovr integer :: ii nspin = 1 nkpts = 1 allocate(ndimovr(nspin,0:nkpts)) ndimovr(1,:) = (/ 4, 4 /) allocate(ovr(ndimovr(nspin,nkpts))) ovr = 1.d0 ii = ndimovr(1,1) call geto(nspin, nkpts, ndimovr, ovr) write(*,*) ovr contains subroutine geto(nspin, nkpts, ndimovr, ovr) integer, intent(in) :: nspin, nkpts integer, dimension(nspin, 0:nkpts), intent(in) :: ndimovr double precision, dimension(ndimovr(1,nkpts)), intent(out) :: ovr ovr(:) = 99.d0 end subroutine geto end program toto ===== ACTUAL OUTPUT: $xlf t.f90 ** toto === End of Compilation 1 === 1501-510 Compilation successful for file tt.f90. $./a.out 1.00000000000000000 1.00000000000000000 1.00000000000000000 1.00000000000000000 ===== EXPECTED OUTPUT: 99.0000000000000000 99.0000000000000000 99.0000000000000000 99.0000000000000000
Local fix
Avoid the use of DIMENSION, such as: ... subroutine geto(nspin, nkpts, ndimovr, ovr) integer, intent(in) :: nspin, nkpts !!------>workaround integer, intent(in) :: ndimovr(nspin, 0:nkpts) !!------>workaround double precision, intent(out) :: ovr(ndimovr(1,nkpts)) ovr(:) = 99.d0 end subroutine geto
Problem summary
PROBLEM DESCRIPTION: XL Fortran gets incorrect values for the dimensions of dummy arguments that satisfy all of the following conditions: 1. The dimensions of the dummy arguments are declared using the DIMENSION attribute. 2. The dimensions of the dummy arguments are specification expressions. 3. One argument's dimensions depend on the value of another argument whose dimensions depend on the value of yet another dummy argument. Under the above conditions, the ordering of the prolog code inserted by XL Fortran to compute the values of the specification expressions at run time does not fully take the dependencies between the dummy arguments. USERS AFFECTED: Users of XL Fortran 13.1.
Problem conclusion
The problem has been fixed. Apply provided service.
Temporary fix
Comments
APAR Information
APAR number
LI77462
Reported component name
XL FORTRAN LINU
Reported component ID
5724X1600
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2013-06-11
Closed date
2013-06-11
Last modified date
2013-06-11
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL FORTRAN LINU
Fixed component ID
5724X1600
Applicable component levels
RD10 PSN IV34529
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
14 October 2021