IBM Support

IZ47265: -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

    IZ47265

  • Reported component name

    XLC C++ AIX

  • Reported component ID

    5724S7100

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-03-20

  • Closed date

    2009-06-25

  • Last modified date

    2009-07-21

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

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

    LI74773 LI74796

Fix information

  • Fixed component name

    XL C AIX

  • Fixed component ID

    5724S7000

Applicable component levels

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

Document Information

Modified date:
03 October 2021