IBM Support

LI76889: C ALIASING ERROR CAUSING INCORRECT STORE REMOVAL

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The following test case causes an incorrect output during
    runtime at -O2.
    
    
    ===== Compile options:
    $ xlc test.c -O2
    
    
    ===== Test case:
    $ cat test.c
    typedef struct dataTy Data;
    
    void bar(Data *);
    void foo(void) { bar(0); }
    
    struct dataTy { int x; };
    Data new_data();
    
    int main(void) {
       Data datA = { 66 };
       datA = new_data();
       return datA.x;
    }
    
    void bar(Data *d) { }
    Data new_data() {
       Data ret = { 55 };
       return ret;
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    $ xlc test.c -O2 && ./a.out
    $ echo $?
    66
    $
    
    
    ===== EXPECTED OUTPUT:
    $ xlc test.c -O2 && ./a.out
    $ echo $?
    55
    $
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    Users using typedef struct before it gets defined may be
    affected by this issue.
    
    PROBLEM DESCRIPTION:
    This issue leads to wrong results at run time when optimization
    is turned on.
    

Problem conclusion

  • The above issue has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76889

  • 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

    2012-07-16

  • Closed date

    2012-07-16

  • Last modified date

    2012-07-23

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

    LI76865

  • 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



Document information

More support for: XL C/C++

Software version: A.1

Reference #: LI76889

Modified date: 23 July 2012


Translate this page: