[llvm-bugs] [Bug 31254] New: [inline asm] ambiguity between register ip and variable name

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Dec 4 01:33:48 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31254

            Bug ID: 31254
           Summary: [inline asm] ambiguity between register ip and
                    variable name
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ziv.izhar at intel.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code doesn't compile:


(compile with -fasm-blocks for this syntax)
void test(int *ip)
{
    __asm {
        mov eax, ip
    }
}

The error is:
<source>:4:5: error: invalid operand for instruction
__asm {
^
<inline asm>:2:2: note: instantiated into assembly here
mov eax, ip
^
1 error generated.



when changing the function declaration to "void test()" it does compile.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161204/d3b64d21/attachment.html>


More information about the llvm-bugs mailing list