Fixes are available
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
XL C for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C for AIX Fix Pack 22 (September 2015 PTF) for 11.1
APAR status
Closed as program error.
Error description
When compiling and linking with -qipa and relink, the comparison in the while loop (in the test case below) is not being satisfied which leads to an infinite loop. ===== COMPILE COMMAND: xlc_r -qutf -qcpluscmt -O -qfdpr -qstrict -qlibansi -qinlglue -qmaxmem=8192 -qarch=ppc -qtune=balanced -qspill=2560 -qsaveopt -qipa=level=0:inline=noauto -qlanglvl=stdc89 -qlonglong -bcdtors:mbr::s -bweaklocal -q64 -brtl -bbigtoc -qipa=relink -qdebug=timing -qpdf1=pdfname=test.pdf1 -qipa=level=0 -lperfstat -lrt -lwlm -lpthread -lm test.c ===== TESTCASE: $ cat test.c #include <stdio.h> int main (int argc, const char* argv[] ) { unsigned char a = 254; while( a != (unsigned char)255){ printf("counter: %d\n", (unsigned int)a); a--; } } $ ===== ACTUAL OUTPUT: Infinite loop ===== EXPECTED OUTPUT: No infinite loop
Local fix
N/A
Problem summary
USERS AFFECTED: Any user that has loop counters less than size int that overflow and the user invokes TPO via -O3, -O4, -O5 or -qipa can be affected by this issue. PROBLEM DESCRIPTION: Loop normalization does not expect loop counters to overflow, and thus generates bad code.
Problem conclusion
The above issue has been corrected within the IPA component of the compiler.
Temporary fix
Comments
APAR Information
APAR number
IV40225
Reported component name
XL C FOR AIX
Reported component ID
5724X1200
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-04-19
Closed date
2013-04-19
Last modified date
2013-04-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 C FOR AIX
Fixed component ID
5724X1200
Applicable component levels
Document Information
Modified date:
02 October 2021