IBM Support

LI74300: INTERNAL COMPILER ERROR IN XLCENTRY WITH -O2

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following reduced test case will generate internal compiler
    error if compiled with xlC v9 with optimization on.
    
    t.C
    struct IUnknown {
      virtual void AddRef() = 0;
    };
    
    struct CATVpmTPAssocPair {
      CATVpmTPAssocPair(const IUnknown *p) {
        if (p!=0) ((IUnknown*)p)->AddRef();
      }
    };
    
    void f() {
      CATVpmTPAssocPair foo((0));
    }
    
    xlC t.C -O2 -c
    1501-230 (S) Internal compiler error; please contact your
    Service Representative
    

Local fix

  • Change CATVpmTPAssocPair foo((0)); =>   CATVpmTPAssocPair
    foo(0);
    
    (Remove the extra parenthesis ()).
    

Problem summary

  • Programs with virtual function calls made through member
    expression in the form of paranthesized null pointer compiled
    with -O2 will generate compiler internal error.
    
    When the compiler inlined the null pointer through which the
    program made the virtual function call, the transformation
    unwound the expression to a literal expression of type int where
    it should have a pointer type and hence the compler generates
    internal compiler error.
    

Problem conclusion

  • The problem is fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI74300

  • Reported component name

    XL C/C++ SLES10

  • Reported component ID

    5724U8300

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-03-31

  • Closed date

    2009-03-31

  • Last modified date

    2009-03-31

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

    IZ28790

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

    LI74346

Fix information

  • Fixed component name

    XL C/C++ SLES10

  • Fixed component ID

    5724U8300

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
16 October 2021