Fixes are available
Closed as program error.
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.
Alter the code to pass elements of the array one by one to the C function.
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
The problem has been fixed. Apply applicable service.
Reported component name
XL FORTRAN FOR
Reported component ID
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
XL FORTRAN FOR
Fixed component ID
Applicable component levels
RE10 PSY U859152
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.