www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2455] New: Cannot use .ptr or .length in asm code


           Summary: Cannot use .ptr or .length in asm code
           Product: D
           Version: 1.011
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au

This was first reported in #1125 as failed workaround. I'm moving it here since
the original bug in #1125 was fixed long ago.
It's in dstress as:


It's probably related to #1252, #1172, and #1173. It seems that fullstops ('.')
are not treated correctly. #1500 may also be related.

void foo(int [] q)
        mov EAX, q.ptr;
//        mov ECX, q.length; // this doesn't work either

There aren't any good workarounds for this. Creating a local variable and using
'naked' are the two best options, but they're both ugly.

Nov 14 2008