Fixes are available
XL C/C++ for Blue Gene/Q Fix Pack 12 (May 2015 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 14 (May 2016 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 15 (October 2017 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 7 (February 2014 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 8 (May 2014 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 9 (August 2014 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 10 (November 2014 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 11 (February 2015 Update) for 12.1
XL C/C++ for Blue Gene/Q Fix Pack 13 (August 2015 Update) for 12.1
APAR status
Closed as program error.
Error description
ERROR DESCRIPTION:Ø In a larger program, the following statement fails with -O3 when the "if" statement is coded: if (memcmp(rr->getLastName().getData(),"Brown",5) != 0) allBrown = false; But it works with -O3 if the "if" statement is coded: if (memcmp(rr->getLastName().getData(),"Brown",5) != 0) { allBrown = false; CPPUNIT_ASSERT (allBrown == true); // or anything else on this line, "cout << ..."for example. } Somehow the "allBrown = false;" statement is executed even when the "if" condition is false when only a single statement follows the "if" with -O3.
Local fix
LOCAL FIX:Ø Change program source or use xlC 12.1.0.0.
Problem summary
PROBLEM DESCRIPTION: Incorrect code generation for IF statements using results of memcmp library function. USERS AFFECTED: Any using XLC/C++ with inlining enabled and -O2 and up, with the code pattern described in the problem description.
Problem conclusion
Fixed an erroneous optimization of if statements using memcmp as the condition.
Temporary fix
Comments
APAR Information
APAR number
LI77871
Reported component name
XL C/C++ FOR BG
Reported component ID
5799AG100
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2014-02-18
Closed date
2014-02-18
Last modified date
2014-02-18
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 BG
Fixed component ID
5799AG100
Applicable component levels
Document Information
Modified date:
05 September 2024