IBM Support

LI74773: -QDATALOCAL CAUSES UNEXPECTED OUTPUT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Compiling the following test case with -qdatalocal causes
    unexpected output.
    
    =====
    /* filename: main.c */
    int main() { func(); }
    =====
    /* filename: func.c */
    extern long *YYY;
    void  func(void) { printf("*YYY = %d\n", *YYY); }
    static void func1(void) {
       void **  fp;
       __asm ("ori %0, 1, 0" : "=r" (*(fp)));
    }
    =====
    /* filename: data.c */
    long     XXX = 9999;
    long    *YYY = &XXX;
    =====
    
    $ xlc -q64 data.c func.c main.c -qdatalocal && ./a.out
    data.c:
    func.c:
    main.c:
    *YYY = 224384
    

Local fix

  • N/A
    

Problem summary

  • Users of inline asm are affected by this issue.
    
    The issue was that accessing TOC direct data defined in another
    compilation unit was not working. So the compiler wasn't
    generating the correct assembly for it.
    

Problem conclusion

  • This has been fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI74773

  • Reported component name

    XL C/C++ RHEL5

  • Reported component ID

    5724S7310

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-07-27

  • Closed date

    2009-07-27

  • Last modified date

    2009-07-27

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

    IZ47265

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

Fix information

  • Fixed component name

    XL C/C++ RHEL5

  • Fixed component ID

    5724S7310

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
16 October 2021