IBM Support

LI74411: ISSUES WITH NAMED RETURN VALUE OPTIMIZATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The test case:
    -- a.C --
    struct Char {
      Char();
      Char(const Char&);
      ~Char();
    };
    
    bool foo(Char&);
    inline const Char trans() {
      Char theResult;
      foo(theResult);
      return theResult;
    }
    
    void bar();
    void * openFile() {
      const Char result(trans());
      bar();
      return 0;
    }
    -- a.C --
    is generating a SYM for theResult after inlining into
    openFile().
    

Local fix

  • N/A
    

Problem summary

  • This issue possibly affects code that throws an
    exception.  A test case cannot seem to be deduced that
    will actually cause a problem in real life code.
    This can only be seen when reading the exception handling
    tables.
    
    The problem was because the state tablry contains a reference to
    a variable that was removed as a result of the named
    return value optimzations.
    

Problem conclusion

  • The parameter inliner should no longer check for a name
    match of the class return value, but check if
    the parameter has a specific flag set.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI74411

  • Reported component name

    XL C/C++ RHEL52

  • Reported component ID

    5724U8310

  • 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:

    LI74311

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

Fix information

  • Fixed component name

    XL C/C++ RHEL52

  • Fixed component ID

    5724U8310

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