Fixes are available
January 2011 PTF for XL C/C++ for AIX, V11.1
May 2011 PTF for XL C/C++ for AIX, V11.1
August 2011 PTF for XL C/C++ for AIX, V11.1
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C/C++ for AIX, V11.1
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
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 following test case fails on AIX with xlC with the error: "overloadresolutionbug.cpp", line 25.45: 1540-0270 (S) An object of type "CtorLookupFailClass<int>" cannot be constructed from an lvalue of type "UniqueType * const". "overloadresolutionbug.cpp", line 25.3: 1540-0700 (I) The previous message was produced while processing "OverloadResolutionBugClass<int>:: OverloadResolutionBugClass(UniqueType * const &)". "overloadresolutionbug.cpp", line 38.8: 1540-0700 (I) The previous message was produced while processing "struct C<UniqueType * const, OverloadResolutionBugClass<int> >". "overloadresolutionbug.cpp", line 52.5: 1540-0700 (I) The previous message was produced while processing "main()". ===== TESTCASE: $cat overloadresolutionbug.cpp.cpp template <typename TYPE> struct TypeClass { static TYPE& type(); }; class UninterestingType { }; template <class T > class CtorLookupFailClass { public: CtorLookupFailClass(); explicit CtorLookupFailClass(UninterestingType *); }; template <unsigned int INT> struct SingleTemplateValueClass { enum { VALUE = (int) INT }; }; template <class T> class OverloadResolutionBugClass : public CtorLookupFailClass<T> { public: template <class U> OverloadResolutionBugClass (const U& v) : CtorLookupFailClass<T>(v) { } }; struct UniqueType { } myTypeObj; struct B { static SingleTemplateValueClass<1> match(B&); template <typename T> static SingleTemplateValueClass<0> match(const T&); template <typename T> static SingleTemplateValueClass<0> match(const volatile T&); }; template <typename FROM_TYPE, typename TO_TYPE > struct C { private: struct Test { B& operator, (TO_TYPE) const; }; public: enum { VALUE = sizeof(B::match((TypeClass<Test>::type(), TypeClass<FROM_TYPE>::type()))) }; }; int main () { const int a = C<struct UniqueType * const , OverloadResolutionBugClass<int> >::VALUE; return 0; }
Local fix
N/A
Problem summary
PROBLEM DESCRIPTION: A template function is being instantiated in the operand of a sizeof, when sizeof operands are not to be evaluated USERS AFFECTED: the problem will only effect users who expect no template functions instantiated as part of the operand of a sizeof
Problem conclusion
template functions will no longer be instantiated when processing the operand of sizeof
Temporary fix
Comments
APAR Information
APAR number
IZ91500
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
2011-01-03
Closed date
2011-01-03
Last modified date
2011-01-05
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
Document Information
Modified date:
05 January 2011