APAR status
Closed as program error.
Error description
The compiler incorrectly removes the Constant Area for the following testcase: ===== COMPILE COMMAND: xlC -c test.cpp -o test.o ===== TESTCASE: $ cat test.cpp extern "C" { static const char *rcsid = "$Header: msopomphase.lcc 120.125.12020000.39 2019/05/07 21:25:00 meyang ship $"; }; int a=0; $ ===== ACTUAL OUTPUT: $ strings test.o | grep Header $ ===== EXPECTED OUTPUT: $ strings test.o | grep Header $Header: msopomphase.lcc 120.125.12020000.39 2019/05/07 21:25:00 meyang ship $ $
Local fix
A workaround is to add a dummy function to the same file so that the constant area is not removed.
Problem summary
USERS AFFECTED: Users who compile with XL C/C++ for AIX, V12.1 and later and have files with only static strings and no compilatin units are affected by this issue. PROBLEM DESCRIPTION: unused static strings is not put into .data and as a result the compiler deletes the information.
Problem conclusion
Users should ideally change their source. But for those who can't an option has been added to keep the static strings via -qdebug=forcedata
Temporary fix
Comments
APAR Information
APAR number
IJ17713
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-07-23
Closed date
2019-08-27
Last modified date
2019-08-27
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
5725C7100
Applicable component levels
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
21 August 2024