Fixes are available
November 2010 Update for XL Fortran for Linux, V13.1
April 2011 Update for XL Fortran for Linux, V13.1
July 2011 Update for XL Fortran for Linux, V13.1
October 2011 Update for XL Fortran for Linux, V13.1
June 2012 Update for XL Fortran for Linux, V13.1
October 2012 Update for XL Fortran for Linux, V13.1
XL Fortran for Linux Fix Pack 8 (June 2013 Update) for 13.1
APAR status
Closed as program error.
Error description
Incorrect output is generated when using optimization -O3 or in conjunction with -q64. ------------------------------------------------------------- Test case(test.c): #include <stdio.h> #include <math.h> int never = 0; int myfoo(double *x) { int rc, i, ok, j; rc = 0; x[0] = 0; x[1] = 0.5; if (never) rc |= 2; printf(" %d %g\n", rc, x[1]); x[1] = floor(x[1]); printf(" %d %g\n", rc, x[1]); if ((x[0] == x[1]) && (x[1] < 1.0)) rc |= 1; if (rc == 0) ; else if (never) { ok= 1; for (i=0; i<10;i++) for (j=0; j<10; j++) if (x[i]) ok=0; } if (rc) printf("GOOD! %d %g %g\n", rc, x[0], x[1]); else printf("BAD! %d %g %g\n", rc, x[0], x[1]); return (rc); } int main() { double x[10] = {0}; return myfoo(x); } ------------------------------------------------------------- ------------------------------------------------------------- Reproduce Instructions: Compiling with XL C/C++ V11.1 # xlC -q64 -O3 test.c -o bad # ./bad 0 0.5 0 0 BAD! 0 0 0 Compiling with XL C/C++ V10.1 # xlC -q64 -O3 test.c -o good # ./bad 0 0.5 0 0 GOOD! 1 0 0 -------------------------------------------------------------
Local fix
N/A
Problem summary
USERS AFFECTED: Users that compile at -O3 or higher maybe affected by this issue. PROBLEM DESCRIPTION: The compiler was performing an incorrect if conversion that resulted in an incorrect output.
Problem conclusion
The compiler has been fixed to properly perform the if conversion.
Temporary fix
Comments
APAR Information
APAR number
LI75785
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
2010-11-23
Closed date
2010-11-23
Last modified date
2010-11-23
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 IZ81166
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
15 October 2021