IBM Support

IZ65936: VIRTUAL FUNCTION WITH VOID TYPE STORES RESULT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Virtual function with return type void stores result.
    
    Here is the testcase that reproduces the problem:
    
    ===== TESTCASE ======
    
    ---- a.C ----
    
    struct ref_p {
        ~ref_p() { }
    };
    void bar(ref_p);
    void foo(ref_p place) {
        ({
            bar(place);
        });
    }
    
    ---- a.C ----
    
    Compile step:
    
    xlC -c a.C -O3
    Calling signal handler...
    1586-494 (U) INTERNAL COMPILER ERROR: Signal 11.
    

Local fix

  • Remove an empty non-virtual destructor:
    
    Failing code:          ~ref_p() { }
    ---
    Workaround:            //~ref_p() { }
    

Problem summary

  • Statement expr may store void result type w/ temps
    

Problem conclusion

  • The uncommon combination of a statement expression not having a
    result (expressions normally have a type and value) and the
    statement expression having clean up (eg. temp destruction)
    that would need to be done after computing the result.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ65936

  • Reported component name

    XL C++ AIX

  • Reported component ID

    5724U8100

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-11-30

  • Closed date

    2010-02-24

  • Last modified date

    2010-02-24

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

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

    LI75544 LI75576

Fix information

  • Fixed component name

    XL C++ AIX

  • Fixed component ID

    5724U8100

Applicable component levels

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

Document Information

Modified date:
06 October 2021