Fixes are available
APAR status
Closed as program error.
Error description
The compiler produced an internal message with the following scenario: ====Compile Line: #xlf -c -O0 -qcheck -qhalt=W -qfree=f90 -qsuffix=f=f90 -qnosave -q64 library.f90 ====Testcase: module LIBRARY use, intrinsic :: ISO_C_BINDING, only: c_loc, c_associated, C_NULL_PTR, c_ptr implicit none integer(kind=4), parameter, public:: types_len = 12 integer(kind=4), parameter, public:: attr_names_len = 128 type shape_int integer(kind=4),dimension(:),allocatable:: shp end type shape_int type attribute_unit integer(kind=1),dimension(:),allocatable:: data end type attribute_unit type attr_struct character(len=attr_names_len),dimension(:),allocatable:: names character(len=types_len),dimension(:),allocatable:: types type(attribute_unit),dimension(:),allocatable:: units type(c_ptr),dimension(:),allocatable:: ptr type(shape_int),dimension(:),allocatable:: shp end type attr_struct type layer character (len=attr_names_len)::name character(len=types_len)::type integer(kind=1),dimension(:),allocatable::data type(c_ptr):: ptr=C_NULL_PTR type(shape_int):: shp type(attr_struct)::attr end type layer public:: layers_adjust contains function layers_adjust(layers,lines_num,overlap) result(jstatus) type(layer),dimension(:),target,intent(inout):: layers integer(kind=4),intent(in):: lines_num integer(kind=4),optional,intent(in):: overlap integer(kind=8):: shift integer:: i,jstatus jstatus=0 do i=1,size(layers) if (c_associated(layers(i)%ptr)) then layers(i)%shp%shp(size(layers(i)%shp%shp))=lines_num if (present(overlap)) then select case (layers(i)%type) case("int8","uint8","string") shift=size(layers(i)%shp%shp)-1 if (shift < 1) then shift=1 else shift=product(layers(i)%shp%shp(1:shift)) endif shift=overlap*shift+1 case("int16","uint16") shift=size(layers(i)%shp%shp)-1 if (shift < 1) then shift=1 else shift=product(layers(i)%shp%shp(1:shift)) endif shift=overlap*2*shift+1 case("int32","uint32","float32") shift=size(layers(i)%shp%shp)-1 if (shift < 1) then shift=1 else shift=product(layers(i)%shp%shp(1:shift)) endif shift=overlap*4*shift+1 case("float64") shift=size(layers(i)%shp%shp)-1 if (shift < 1) then shift=1 else shift=product(layers(i)%shp%shp(1:shift)) endif shift=overlap*8*shift+1 end select layers(i)%ptr=c_loc(layers(i)%data(shift)) endif endif enddo end function layers_adjust end module LIBRARY ======Actual Output: #xlf -c -O0 -qcheck -qhalt=W -qfree=f90 -qsuffix=f=f90 -qnosave -q64 library.f90 ** library === End of Compilation 1 === 1585-104 COMPILER LIMIT EXCEEDED: Program is too large or too complicated to be compiled with this level of optimization. Please reduce the size or complexity of the program, or recompile with a lower level of optimization. 1501-511 Compilation failed for file library.f90. # ======Expected Output: Should compile clean.
Local fix
n/a
Problem summary
USERS AFFECTED: Users having address assignment of allocatable components of derived-type to c_ptr in the code may run into this problem. PROBLEM DESCRIPTION: Compilation may fail when address of an allocatable component of a derived-type object is assigned to a c_ptr.
Problem conclusion
The compiler has been fixed to address this issue.
Temporary fix
Comments
APAR Information
APAR number
LI75936
Reported component name
XL FORTRAN SLES
Reported component ID
5724U8400
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-01-27
Closed date
2011-01-27
Last modified date
2011-01-27
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 SLES
Fixed component ID
5724U8400
Applicable component levels
RC10 PSN IZ72759
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSB259","label":"XL Fortran Advanced Edition for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
24 February 2022