www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13938] New: IASM shouldn't be able to access TLS variables

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

          Issue ID: 13938
           Summary: IASM shouldn't be able to access TLS variables
           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()
{
    static int val;
    asm
    {
        mov EAX, val;
    }
}
CODE

dmd -c bug

This should print an error because the TLS variable can't be accessed like
that.

--
Jan 05 2015