IBM Support

LI81222: MISSING SWITCH/CASE CASE WITH -O3 AND HOT

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • When compiling with optimization (-O3 and -qhot), a case
    in a switch/case statement is removed incorrectly.  For example:
    
         switch(value) {
         case 1:
         rc = func(st);
         break;
         case 2:
         rc = func(st);
         break;
         case 4:
         rc = func(st);
         break;
         }
    
    , the '4' case is optimized away, and no code is run if value=4.
    

Local fix

  • Reduce optimization level
    

Problem summary

  • PROBLEM DESCRIPTION:
    A valid switch/case execution path is incorrectly determined to
    never be used, and is removed during code optimization.
    
    USERS AFFECTED:
    Users compiling code at -O3
    

Problem conclusion

  • The bad code optimization was corrected and the switch code is
    now generated correctly.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI81222

  • Reported component name

    XL C/C++ LINUX

  • Reported component ID

    5725C7310

  • Reported release

    G11

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-12-06

  • Closed date

    2020-03-11

  • Last modified date

    2020-03-11

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

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

    IJ24658

Fix information

  • Fixed component name

    XL C/C++ LINUX

  • Fixed component ID

    5725C7310

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
01 May 2020