Fixes are available
XL C/C++ for Linux Fix Pack 8 (October 2015 Update) for 12.1
XL C/C++ for Linux Fix Pack 4 (October 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 5 (December 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 6 (February 2014 Update) for 12.1
XL C/C++ for Linux Fix Pack 7 (May 2014 Update) for 12.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
LI77596
Reported component name
XL C/C++ FOR LI
Reported component ID
5725C7300
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-10-28
Closed date
2013-10-28
Last modified date
2013-10-28
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/C++ FOR LI
Fixed component ID
5725C7300
Applicable component levels
RC10 PSN IV39402
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
13 October 2021