Fixes are available
APAR status
Closed as program error.
Error description
When compiling the following test case with -qipa, the IPA linker complains about type mis-matches when it should not: ===== TESTCASE: $cat main.c struct A { int a,b,c; }; extern struct A a; int foo(), foo2(); int main() { a.a=1; foo(); } $ $cat test1.c struct A { int a,b,c; }; struct A *a; int foo() { return 1; } int* bat() { return &a->a; } $ ===== ACTUAL OUTPUT: $xlc -+ -q64 -qipa -c main.c test1.c main.c: test1.c: $ar -X64 r libtest.a main.o test1.o ar: Creating an archive file libtest.a. $xlc -q64 -qipa libtest.a 1586-281 (E) A type mismatch was detected for symbol "a". 1586-107 (S) An error was encountered during object information processing. 1586-206 (S) Unresolved reference to symbol "a". 1586-204 (S) Unresolved references to objects are detected. 1586-341 (U) Code generation was not performed due to previously detected errors. Object file not created. $ ====== EXPECTED OUTPUT: $xlc -+ -q64 -c main.c test1.c main.c: test1.c: $ar -X64 r libtest.a main.o test1.o ar: Creating an archive file libtest.a. xlc -q64 libtest.a
Local fix
n/a
Problem summary
USERS AFFECTED: Anyone using IPA Level 1 or higher that has exception handling code could theorectically run into this PROBLEM DESCRIPTION: The problem is that when the IPA linker finds a mismatch reference or definition, it just ignores it. If the mismatch happens to be the only definition for the symbol, it will treat the symbol as undefined and issue an error. The system linker behavior is to only fail to link under -qextchk.
Problem conclusion
The IPA linker has been changed to conform with what the system linker does when -qextchk is not specified, ie accept the mismatch if its the only definition for the symbol.
Temporary fix
Comments
APAR Information
APAR number
LI76644
Reported component name
XL C/C++ FOR LI
Reported component ID
5724X1400
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2012-02-06
Closed date
2012-02-06
Last modified date
2012-02-06
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
5724X1400
Applicable component levels
RB10 PSN IV10153
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":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021