www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13939] New: IASM shouldn't access global symbol with PIC code

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

          Issue ID: 13939
           Summary: IASM shouldn't access global symbol with PIC code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
void test1()
{
    __gshared int val;
    asm
    {
        mov EAX, val;
    }
}
CODE

dmd -c -fPIC bug

It should be an error to access a global variable in IASM when compiling PIC
code.

--
Jan 05 2015