Fixes are available
XL Fortran for Blue Gene/Q Fix Pack 12 (May 2015 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 14 (May 2016 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 15 (October 2017 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 6 (November 2013 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 7 (February 2014 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 8 (May 2014 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 9 (August 2014 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 10 (November 2014 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 11 (February 2015 Update) for 14.1
XL Fortran for Blue Gene/Q Fix Pack 13 (August 2015 Update) for 14.1
APAR status
Closed as program error.
Error description
The following test case shows that XLF is mishandling function results as actual arguments when the result is a pointer with allocatable components. $cat reduced.f90 MODULE MOD_NCLL IMPLICIT NONE TYPE INTERP_WEIGHTS INTEGER, allocatable :: INDEX(:) END TYPE INTERP_WEIGHTS TYPE NCFILE TYPE(INTERP_WEIGHTS),POINTER :: INTERP_C END TYPE NCFILE CONTAINS FUNCTION NCF_PLUS_NCF(NCF1, NCF2) RESULT(RET) IMPLICIT NONE TYPE(NCFILE), POINTER :: NCF1 TYPE(NCFILE), POINTER :: NCF2 type(NCFILE), POINTER :: RET WRITE(0,*) '(debug NCF_PLUS_NCF) associated(NCF2)=',ASSOCIATED(NCF2) RET => NCF2 END FUNCTION NCF_PLUS_NCF FUNCTION ZETA_FILE_OBJECT() RESULT(NCF) IMPLICIT NONE TYPE(NCFILE), POINTER :: NCF ALLOCATE(NCF) write(0,*) '(ZETA_FILE_OBJECT: associated(ncf)=',associated(ncf) END FUNCTION ZETA_FILE_OBJECT END MODULE MOD_NCLL PROGRAM test USE mod_ncll IMPLICIT NONE TYPE(NCFILE), POINTER :: NCF NCF => NCF_PLUS_NCF(NCF, ZETA_FILE_OBJECT() ) END PROGRAM test xlf -O0 -g -qfullpath -qsuffix=cpp=f90 reduced.f90 ** mod_ncll === End of Compilation 1 === ** test === End of Compilation 2 === 1501-510 Compilation successful for file reduced.f90. $./a.out (ZETA_FILE_OBJECT: associated(ncf)= T (debug NCF_PLUS_NCF) associated(NCF2)= F
Local fix
Change INTEGER, allocatable :: INDEX(:) to INTEGER, POINTER :: INDEX(:)
Problem summary
PROBLEM DESCRIPTION: When a pointer function result with allocatable components is passed to another procedure as actual argument, compiler may generate incorrect code while loading the address of the argument. User application may produce incorrect results due to this problem. USERS AFFECTED: Users passing pointer function results with allocatable components as actual arguments will see this problem.
Problem conclusion
The problem has been fixed. Apply applicable service.
Temporary fix
Comments
APAR Information
APAR number
LI77717
Reported component name
XL FORTRAN FOR
Reported component ID
5799AH100
Reported release
E10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-11-26
Closed date
2013-11-26
Last modified date
2013-11-26
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 FOR
Fixed component ID
5799AH100
Applicable component levels
RE10 PSN IV47327
UP06/09/13
Document Information
Modified date:
26 November 2013