IBM Support

IZ92366: INVALID PROCEDURE ARGUMENT ERROR

Subscribe

You can track all active APARs for this component.

 

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

    IZ92366

  • Reported component name

    XL FORTRAN AIX

  • Reported component ID

    5724U8200

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-01-17

  • Closed date

    2011-03-08

  • Last modified date

    2011-03-08

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI76091

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5724X1500

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH4D","label":"XL Fortran for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
08 March 2011