APAR status
Closed as program error.
Error description
When passing the return result of a function to a subroutine as a parameter, the compiler is outputting an invalid error message: "test.F90", line 13.12: 1513-082 (S) Internal procedures may not be passed as actual arguments. ===== TEST CASE ===== SUBROUTINE sub(array) LOGICAL,DIMENSION (*),INTENT(in) :: array PRINT *, array(1:9) END SUBROUTINE sub PROGRAM test IMPLICIT NONE LOGICAL :: array(25) array = .FALSE. CALL sub(func(array, & RESHAPE ((/1,1,5,5/), (/2,2/)), & RESHAPE ((/2,2,4,4/), (/2,2/)))) CONTAINS FUNCTION func (src, foo, bar) INTEGER, INTENT (in) :: foo (2, 2), & bar (2, 2) LOGICAL, INTENT (in) :: src(foo(1,1):foo(2,1), & foo(1,2):foo(2,2)) LOGICAL :: func (bar(1,1):bar(2,1), & bar(1,2):bar(2,2)) func = src(bar(1,1):bar(2,1), & bar(1,2):bar(2,2)) END FUNCTION func END PROGRAM test
Local fix
Define an INTERFACE for the subroutine.
Problem summary
PROBLEM DESCRIPTION: The compiler flags an error when calling an external procedure with an implicit interface, with the result from an internal function call as its argument. USERS AFFECTED: Users who use this form of a call: call implicit_interface_sub(internal_func(...))
Problem conclusion
When checking semantics, the compiler was checking if an argument was an internal function, however it did not look further into whether the argument is a function call or not. A fix was added to check for an expression result.
Temporary fix
Comments
APAR Information
APAR number
LI76091
Reported component name
XL FORTRAN LINU
Reported component ID
5724X1600
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2011-04-27
Closed date
2011-04-27
Last modified date
2011-04-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 LINU
Fixed component ID
5724X1600
Applicable component levels
RD10 PSN IZ92366
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
27 April 2011