Fixes are available
September 2012 PTF for XL Fortran for AIX, V12.1
October 2010 PTF for XL Fortran for AIX, V12.1
June 2010 PTF for XL Fortran for AIX, V12.1
February 2011 PTF for XL Fortran for AIX, V12.1
May 2011 PTF for XL Fortran for AIX, V12.1
July 2011 PTF for XL Fortran for AIX, V12.1
October 2011 PTF for XL Fortran for AIX, V12.1
February 2012 PTF for XL Fortran for AIX, V12.1
January 2013 PTF for XL Fortran for AIX, V12.1
XL Fortran for AIX Fix Pack 18 (July 2013) for 12.1
XL Fortran for AIX Fix Pack 19 (October 2013) for 12.1
XL Fortran for AIX Fix Pack 20 (October 2014 PTF) for 12.1
APAR status
Closed as program error.
Error description
The following test case segfaults due to a pointer violation created by the compiler: ===== COMPILE COMMAND: $xlc -c zc.c $xlf90 -c -qsource,list zom.f $xlf90 -c -qsource,list zz.f $xlf90 zz.o zom.o zc.o ===== TESTCASE: $ cat zc.c #include <stdio.h> #include <stdlib.h> #include <string.h> void zc(long long ii) { fprintf(stderr,"ii = %ld\n",ii); } $ $ cat zom.f MODULE ZOM INTEGER :: JPNOTP parameter(jpnotp=10) ! JOT JO table, derived type TYPE jotsub_t CHARACTER(len=32) :: sname ! name of sub-table REAL*8 , POINTER :: cost(:,:) ! cost function value INTEGER, POINTER :: count(:,:) ! data count REAL*8 , POINTER :: obimpact(:,:) ! obs impact END TYPE jotsub_t TYPE jot_t CHARACTER(len=32) :: name ! name of table entry INTEGER :: size ! size of sub-table TYPE(jotsub_t), POINTER :: jost(:) ! Jo sub-table END TYPE jot_t TYPE(jot_t) :: jot(JPNOTP) ! Jo-table INTEGER :: NPRTBINS=1 INTEGER :: JPXVAR=10 end module zom $ $ cat zz.f call zzz() end @PROCESS NOOPT SUBROUTINE zzz USE ZOM IMPLICIT NONE INTEGER :: INOCTP,JCTP,IOBTYP INOCTP=10 IOBTYP=10 ALLOCATE(JOT(IOBTYP)%jost(INOCTP)) do jctp=1,10 ALLOCATE(JOT(IOBTYP)%jost(JCTP)%cost (JPXVAR,NPRTBINS)) ALLOCATE(JOT(IOBTYP)%jost(JCTP)%count(JPXVAR,NPRTBINS)) ALLOCATE(JOT(IOBTYP)%jost(JCTP)%obimpact(JPXVAR,NPRTBINS)) write(0,*) "IOBTYP,JCTP=",IOBTYP,JCTP call zc(JOT(IOBTYP)%jost(JCTP)%cost(1,1)) JOT(IOBTYP)%jost(JCTP)%cost(:,:)= 0.0 JOT(IOBTYP)%jost(JCTP)%count(:,:)= 0.0 JOT(IOBTYP)%jost(JCTP)%obimpact(:,:) = 0.0 enddo END $ ===== ACTUAL OUTPUT: $ ./a.out IOBTYP,JCTP= 10 1 ii = 51245076 Segmentation fault $ ===== EXPECTED OUTPUT: $ ./a.out IOBTYP,JCTP= 10 1 ii = 536876824 IOBTYP,JCTP= 10 2 ii = 537003080 IOBTYP,JCTP= 10 3 ii = 537003320 IOBTYP,JCTP= 10 4 ii = 537003560 IOBTYP,JCTP= 10 5 ii = 537003800 IOBTYP,JCTP= 10 6 ii = 537004040 IOBTYP,JCTP= 10 7 ii = 537004280 IOBTYP,JCTP= 10 8 ii = 537004520 IOBTYP,JCTP= 10 9 ii = 537004760 IOBTYP,JCTP= 10 10 ii = 537005000 $
Local fix
n/a
Problem summary
USERS AFFECTED: Users who use modules to declare variables of types containing pointer alike components will be affected. PROBLEM DESCRIPTION: The execution of the program fails in a particular situation. 1. The program contains a reference to a variable that is of derived type containing a allocatable/pointer component and declared in a module, and 2. There is a variable declared in the same module and appearing before the affected variable.
Problem conclusion
When computing base address of an internal component, the compiler needed to take module variables into consideration.
Temporary fix
Comments
APAR Information
APAR number
IZ72918
Reported component name
XL FORTRAN AIX
Reported component ID
5724U8200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-03-15
Closed date
2010-06-03
Last modified date
2010-06-03
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 AIX
Fixed component ID
5724U8200
Applicable component levels
Document Information
Modified date:
24 February 2022