IBM Support

LI78462: STATIC/GLOBAL VARIABLE VALUE PROPAGATED PAST FUNCTION CALL WITH -QIPA

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A global or static variable's value is not changed after a call
    to an external library function that modifies the value.  The
    variable's value previous to the external function call is
    propagated past the call, and used in later operations.
    
    
        ==== EXAMPLE ====
    
      test_val = 999;              // SET test_val IN MAIN()
    
      <some_external_function>();  // CALL EXTERNAL FUNCTION
                                   // SETS test_val TO 1
    
      char *temp;
      if(test_flg==1)        temp="OK";
      else if(test_flg==999) temp="WRONG";
                                   // AFTER IPA OPTIMIZATION, 999 IS
                                      PROPAGATED PAST EXTERNAL
                                      FUNCTION CALL, AND IF
                                      STATEMENT FAILS
    

Local fix

  • Do not use -qipa optimization.
    

Problem summary

  • PROBLEM DESCRIPTION:
    Incorrect variable aliasing can lead to invalid optimizations
    being performed.
    
    USERS AFFECTED:
    Any using ipa link with indirect calls to/from functions in
    shared libraries or object files that were not compiled with
    -qipa.
    

Problem conclusion

  • Disabled the optimization that was causing the bad aliasing.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI78462

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5725C7300

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-02-25

  • Closed date

    2015-02-25

  • Last modified date

    2015-02-25

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

    IV62893

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

Reference #: LI78462

Modified date: 25 February 2015