IBM Support

LI77885: TYPEDEFS INSIDE OF WHILE LOOP CONDITION CAUSES ERROR

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The compiler issues internal compiler error on typedefs inside
    of while loop condition statement due to destructors being
    added onto the typedef declaration.
    
    The following testcase illustrates the problem:
    
    $cat test_case.cpp
    // Start test_case.cpp
    typedef unsigned char some_char;
    
    template <typename T>
    struct hash;
    
    template <>
    struct hash<const char*> {
        unsigned int
        operator()(const char *v) const
        {
            unsigned int ret = 0;
            while(some_char ch = *v++) {
                ret = 1;
            }
            return ret;
        }
    };
    // End test_case.cpp
    
    Compiling the testcase with xlC causes compiler to fail with
    internal compiler error:
    
    $xlC -c test_case.cpp
    /usr/vacpp/bin/xlC: 1501-230 (S) Internal compiler error;
    please contact your Service Representative. For more
    information visit:
    http://www.ibm.com/support/docview.wss?uid=swg21110810
    

Local fix

  • Do not use typedefs.
    

Problem summary

  • assume failure on typedefs inside of while loop condition
    statement due to destructors being added onto the typedef
    declaration
    

Problem conclusion

  • Typedefs were guarded and peeled off so the compiler does not
    add a destructor in an incorrect location.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI77885

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5725C7300

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-02-26

  • Closed date

    2014-02-26

  • Last modified date

    2014-02-26

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

    IV53899

  • 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



Document information

More support for: XL C/C++ for Linux
Compiler

Software version: 12.1

Reference #: LI77885

Modified date: 26 February 2014