IBM Support

LI77637: INLINE ASM PARSING LABEL INCORRECTLY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A simple inline ASM branch instruction to a label is causing a
    compile-time assembler error.
    
    
       ===== TEST CASE =====
    
    int main()
    {
       int test;
    
       asm("   li %0,0    \n"
           "   bc 7,27,1f \n"
           "   li %0,1    \n"
           "1: \n"
           :  "=r"(test) );
    }
    
    
    $ xlc test.c
    Assembler:
    test$1.s: line 49: 1252-142 Syntax error.
    1500-067:(S) asm statement generates errors in assembler output.
    $
    
    The generated intermediate 'test$1.s' assembler file contains
    the following processed inline ASM:
    
       +48     li 0,0
       +49     bc 7,27,1f
       +50     li 0,1
       +51  .LL1_0:
    
    The '1f' branch label is not processed correctly, causing the
    assembler syntax error.
    

Local fix

  • - Add a space character between the comma and label in the
    inline ASM branch instruction
    - Use a label that does not begin with a digit character
    

Problem summary

  • USERS AFFECTED:
    Users writing inline ASM using local labels.
    

Problem conclusion

  • The compiler was corrected to support local labels next to
    comma characters.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI77637

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5725C7300

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-10-28

  • Closed date

    2013-10-28

  • Last modified date

    2013-10-28

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

    IV45186

  • 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

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

Document Information

Modified date:
14 October 2021