[Issue 16963] New: Wrong label name resolution in asm statement

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Dec 10 22:23:23 PST 2016


https://issues.dlang.org/show_bug.cgi?id=16963

          Issue ID: 16963
           Summary: Wrong label name resolution in asm statement
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: rumbu at rumbu.ro

If there is a symbol with the same name as a label in an asm statement, any
jump instruction to that label will go to the symbol instead, even it's in
another module.

import core.cpuid;

void foo()
{
  asm
  {
    jmp sse;   //this will jump to core.cpuid.sse;
    sse:
    ret;
  }
}

--


More information about the Digitalmars-d-bugs mailing list