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

    IV45186

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-07-04

  • Closed date

    2013-09-18

  • Last modified date

    2013-09-20

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

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

    LI77637

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RC10 PSY U861595

       UP C



Rate this page:

(0 users)Average rating

Document information


More support for:

XL C for AIX
Compiler

Software version:

12.1

Reference #:

IV45186

Modified date:

2013-09-20

Translate my page

Machine Translation

Content navigation