A fix is available
APAR status
Closed as program error.
Error description
The following test case produces an internal compiler error when compiled with the options listed below: ===== COMPILE COMMAND: bgxlc++ bug_template.cpp ===== TESTCASE: $ cat bug_template.cpp //notice that if I replace "unsigned" with "int" everything works as it //should: //template <int n> class A{}; template <unsigned n> class A{}; struct B{ unsigned n; // also swapping the two next lines fixes the problem: template <class T> B(T&t); template <unsigned n> B(A<n> &p); }; // the order of these two definitions on the other hand is irrelevant: template <unsigned m> B::B(A<m> &p): n(m){} template <class T> B::B(T &p): n(1){} int main(){ A<1> a; B b(a); return 0; } $ ===== ACTUAL OUTPUT: bgxlc++ bug_template.cpp 1540-0505 (S) The build failed and there are no messages. 1540-0527 (I) The build failure may be because of an Internal Compiler Error or because a tool failed to generate a message. For more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810 ===== EXPECTED OUTPUT: Should not produce an internal compiler error.
Local fix
Use "int" instead of "unsigned"
Problem summary
USERS AFFECTED: Linux users with more then 1 user defined constructor which are template functions within non template class may be affected by this issue. PROBLEM DESCRIPTION: When there are more then 1 user defined constructors, multiple template instances can be instantiated with the same type. The compiler then picks the wrong one and further cannot resolve template arguments leading to an internal compiler error.
Problem conclusion
The issue has been solved by selecting the correct template instance of the constructor.
Temporary fix
Comments
APAR Information
APAR number
LI78473
Reported component name
XL C/C++ FOR LI
Reported component ID
5725C7300
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2015-02-25
Closed date
2015-02-25
Last modified date
2015-02-25
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
5725C7300
Applicable component levels
RD10 PSN LI78288
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":"13.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021