IV37232: INCORRECT OUTPUT FROM FORTRAN/C BINDING PROCEDURE WITH -O

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A testcase is composed of a C program and a Fortran program.
    In the Fortran source code, an array of C-type pointers is
    defined. The malloc() function from libc is called to allocate
    each of these pointers and the array is displayed to the user
    in two ways
    1. With a Fortran function
    2. With a C function
    
    When both C and Fortran source files are compiled with no
    optimization (-O0) then both functions show the same results.
    However, wrong runtime results are displayed for the C function
    if optimizatino is used to compile the Fortran program.
    

Local fix

  • Alter the code to pass elements of the array one by one to the
    C function.
    

Problem summary

  • PROBLEM DESCRIPTION: when passing a pointer structure member as
    argument to a bind(c) procedure, wrong values are received on
    the C side
    
    USERS AFFECTED: Any user who passes a structure member to a
    bind(c) procedure and compiles at -O2 and above
    

Problem conclusion

  • The problem has been fixed. Apply applicable service.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV37232

  • Reported component name

    XL FORTRAN FOR

  • Reported component ID

    5725C7400

  • Reported release

    E10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-02-26

  • Closed date

    2013-06-14

  • Last modified date

    2013-06-17

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

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

    LI77682

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5725C7400

Applicable component levels

  • RE10 PSY U859152

       UP C



Rate this page:

(0 users)Average rating

Document information


More support for:

XL Fortran for AIX
Compiler

Software version:

14.1

Reference #:

IV37232

Modified date:

2013-06-17

Translate my page

Machine Translation

Content navigation