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 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
Using a divide operation on an array as an argument to a function, the compiler is incorrectly outputting an error message: myvar = My_Class(1./val) ! ERROR HERE 1516-082 (S) Array object or expression is invalid in this context. The issue occurs when an array variable is specified as the denominator. If the array variable is specified as the numerator, the error does not occur. === TEST CASE === module my_module public :: My_Class type :: My_Class integer :: n real, allocatable :: ifc(:,:) end type My_Class interface My_Class module procedure my_constructor end interface contains function my_constructor(ifc) result(return) real, intent(in) :: ifc(:,:) type(My_Class) :: return end function my_constructor end module my_module program test_constructor use my_module type(My_Class) :: myvar real :: val(5,5) = 1. myvar = My_Class(1./val) ! ERROR HERE end program test_constructor $ xlf2003 test.F ** my_module === End of Compilation 1 === "test.F", line 28.18: 1516-082 (S) Array object or expression is invalid in this context. ** test_constructor === End of Compilation 2 === 1501-511 Compilation failed for file test.F. $
Local fix
Use a temporary array variable to do the division calculation, then pass the temporary to the function call.
Problem summary
PROBLEM DESCRIPTION: The compiler is not propagating the array information from the 2nd array operand to the whole expression. The compile then failed when checking the interface of the procedure reference. USERS AFFECTED: Users who pass an array operation expression where the array is the 2nd operand and the 1st operand is not an array, to a function that expects an array argument.
Problem conclusion
The issue was corrected.
Temporary fix
Comments
APAR Information
APAR number
LI78098
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
2014-09-02
Closed date
2014-11-18
Last modified date
2014-11-18
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 PSY
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS2MB5","label":"XL Fortran for Blue Gene\/Q"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"ALL VERSIONS","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
18 November 2014