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
When compiling code that calls the C_F_POINTER procedure using an array result from an elemental function, the 'xlfhot' component of the compiler is encountering an internal error: $ cat test.f90 PROGRAM test USE iso_c_binding, ONLY: c_ptr, c_loc, c_f_pointer TYPE mytype INTEGER :: a, b END TYPE mytype TYPE(mytype) :: bla(2) INTEGER, TARGET :: baz(100, 100) INTEGER, POINTER :: q(:, :) TYPE(c_ptr) :: p bla = mytype(100, 1) p = C_LOC(baz) CALL C_F_POINTER(p, q, getfirst(bla)) CONTAINS ELEMENTAL FUNCTION getfirst(num) RESULT(a) TYPE(mytype), INTENT(in) :: num INTEGER :: a a = num%a END FUNCTION getfirst END PROGRAM test $ xlf2003 test.f90 ** test === End of Compilation 1 === 1585-100 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 test.f90. $
Local fix
Create a temporary array calling the elemental function, then pass the array to C_F_POINTER: temp = getfirst(bla) CALL C_F_POINTER(p, q, temp)
Problem summary
PROBLEM DESCRIPTION: An internal compiler error is encountered when C_F_POINTER is called and the shape argument is a non-primary expression. USERS AFFECTED: Users who call C_F_POINTER and pass an expression in as the shape argument.
Problem conclusion
The compiler now creates a temporary to store the result of the expression before passing it to C_F_POINTER.
Temporary fix
Comments
APAR Information
APAR number
LI77680
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 IV45207
UP06/09/13
Document Information
Modified date:
26 November 2013