Fixes are available
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
APAR status
Closed as program error.
Error description
The signature for a template function with a const type parameter is being generated the same as the template function with a non-const type parameter. This is causing internal and external linkage conflicts because the same function name is being used for two different functions. ===== TEST CASE ===== template<class T> class MyClass { }; float testfunc(MyClass<float>) { return 1; } float testfunc(MyClass<const float>){ return 2; } void test() { MyClass<float> withfloat; MyClass<const float> withconstfloat; 1 == testfunc(withfloat); 2 == testfunc(withconstfloat); } line 5.7: 1540-0704 (S) The definitions of "float testfunc(MyClass<const float>)" and "float testfunc(MyClass<float>)" have the same linkage signature "testfunc__F7MyClassXTf_".
Local fix
N/A
Problem summary
PROBLEM DESCRIPTION: A problem with name mangling of template type parameters causes a compilation error. USERS AFFECTED: Users of templates instantiated using datatypes with cv-qualified names.
Problem conclusion
The name mangling behaviour was corrected in the V12.1 compiler by default. The fix for the V11.1 compiler is controlled via the option: -qxflag=MangleCVOnTemplateTypeArgs
Temporary fix
Comments
APAR Information
APAR number
IV30906
Reported component name
XL C/C++ AIX
Reported component ID
5724X1300
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-10-26
Closed date
2013-02-07
Last modified date
2013-02-08
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++ AIX
Fixed component ID
5724X1300
Applicable component levels
RB10 PSY U858036
UP C
Document Information
Modified date:
08 February 2013