IBM Support

LI76823: INVALID OUTPUT AT -O2, -O3, -O4 IN 64-BIT MODE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The compiler issues incorrect output with the following testcase
    while using optimization (-O2, -O3 or -O4) in 64-bit mode (-q64)
    at compile time.
    
    /***********************    testcase    **********************/
    void main ()  {
    int i,bufL;
    char *memptr = "Hello";
    char *p = memptr;
    
       for (i=1; i <= 2; i++) {
             if (memptr != p)
                printf("WRONG: memptr=0x%lx != p=0x%lx\n",memptr,p);
             bufL = p-memptr;
             memptr += bufL;
          }
    }
    /**************************************************************/
    

Local fix

  • Use noopt or -O5 at compile time.
    

Problem summary

  • Failed to sign extend 32-bit signed value in 64-bit mode
    

Problem conclusion

  • The problem had been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76823

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-05-24

  • Closed date

    2012-05-24

  • Last modified date

    2012-05-24

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

    IV14903

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

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5724X1400

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"}],"Version":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
17 October 2021