Fixes are available
November 2009 PTF for XL C/C++ for AIX, V10.1
October 2010 PTF for XL C/C++ for AIX, V10.1
October 2010 PTF for XL C for AIX, V10.1
May 2012 PTF for XL C/C++ for AIX, V10.1
January 2013 PTF for XL C for AIX, V10.1
January 2013 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 21 (October 2015 PTF) for 10.1
XL C for AIX Fix Pack 21 (October 2015 PTF) for 10.1
November 2009 PTF for XL C for AIX, V10.1
March 2010 PTF for XL C for AIX, V10.1
March 2010 PTF for XL C/C++ for AIX, V10.1
April 2010 PTF for XL C for AIX, V10.1
April 2010 PTF for XL C/C++ for AIX, V10.1
June 2010 PTF for XL C/C++ for AIX, V10.1
June 2010 PTF for XL C for AIX, V10.1
February 2011 PTF for XL C for AIX, V10.1
May 2011 PTF for XL C/C++ for AIX, V10.1
May 2011 PTF for XL C for AIX, V10.1
October 2011 PTF for XL C/C++ for AIX, V10.1
October 2011 PTF for XL C for AIX, V10.1
February 2012 PTF for XL C for AIX, V10.1
February 2012 PTF for XL C/C++ for AIX, V10.1
May 2012 PTF for XL C for AIX, V10.1
September 2012 PTF for XL C for AIX, V10.1
September 2012 PTF for XL C/C++ for AIX, V10.1
XL C for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C for AIX Fix Pack 20 (October 2014 PTF) for 10.1
XL C/C++ for AIX Fix Pack 20 (October 2014 PTF) for 10.1
APAR status
Closed as program error.
Error description
The compiler generates error messages for the following test case in 64bit that uses asm statements: ===== COMPILE COMMAND: xlC_r -q64 -o test test.cpp ===== TESTCASE: ====Start of test.cpp===== #include <iostream> using namespace std; class base0 { public: virtual void setUp(){}; }; class base1{ public: virtual void anyFunc(){}; ~base1(){}; }; template<typename T> class base2{ public: virtual ~base2(){}; virtual void helloWorld(){ asm("lwsync"); //<--error due to the following return; } }; template<typename T, typename C> class child: public base0, public base1, public base2<T>{ private: C c1; public: int doSomething(){return 7;} void setUp(){}; virtual ~child(){}; }; template<typename T> class paraTempl{ public: int para; }; int main(int argc, char *argv[]){ child<paraTempl<int>, int> c; std::cout << c.doSomething(); c.setUp(); c.anyFunc(); return 0; } ========End of test.cpp=================== ===== ACTUAL OUTPUT: $xlC_r -q64 -o test test.cpp Assembler: test.s: line 12082: 1252-023 The symbol __dt__5childXT9paraTemplXTi_Ti_F__t16_v__Fv is not defined. test.s: line 12082: 1252-040 The specified expression is not valid. Make sure that all symbols are defined. Check the rules on symbols used in an arithmetic expression concerning relocation. test.s: line 12665: 1252-023 The symbol __dt__5childXT9paraTemplXTi_Ti_F__t16_v__Fv is not defined. test.s: line 12665: 1252-040 The specified expression is not valid. Make sure that all symbols are defined. Check the rules on symbols used in an arithmetic expression concerning relocation. 1500-067: (S) asm statement generates errors in assembler output. ===== EXPECTED OUTPUT: Should compile clean
Local fix
You can use built-ins to work around this issue. You will need to add: #include <builtins.h> and instead of asm("lwsync"); replease it with the following built-in __lwsync();
Problem summary
Users using asm with -q64 may be affected by this issue. The compiler optimizer was not able to handle thunks with asm generated by the front end. This resulted in a serious of compile time errors produced by the assembler during compile time.
Problem conclusion
The compiler optimizer has been fixed to handle thunks with asm.
Temporary fix
Comments
APAR Information
APAR number
IZ60196
Reported component name
XL C++ AIX
Reported component ID
5724U8100
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-09-07
Closed date
2009-11-16
Last modified date
2009-11-16
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 AIX
Fixed component ID
5724U8000
Applicable component levels
Document Information
Modified date:
04 October 2021