IBM Support

LI78288: INTERNAL COMPILER ERROR IN XLCENTRY

Subscribe

You can track all active APARs for this component.

 

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

    LI78288

  • Reported component name

    XL C/C++ FOR BG

  • Reported component ID

    5799AG100

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-11-18

  • Closed date

    2015-02-13

  • Last modified date

    2015-02-13

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV68023 LI78473

Fix information

  • Fixed component name

    XL C/C++ FOR BG

  • Fixed component ID

    5799AG100

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS2LWA","label":"XL C\/C++ for Blue Gene\/Q"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

Modified date:
05 September 2024