[Issue 17385] Too much commands

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 20 12:25:18 UTC 2020


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

Simen Kjaeraas <simen.kjaras at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |simen.kjaras at gmail.com
         Resolution|INVALID                     |---

--- Comment #6 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
This is the code (which is available in the URL that the shortlink resolves
to):

int square(ref int num) {
   num = 11;
   return 0;
}

Putting that in run.dlang.io, setting flags to '-O' and clicking the ASM button
gives this:


int onlineapp.square(ref int):
                push    RBP
                mov     RBP,RSP
                mov     dword ptr [RDI],0Bh
                xor     EAX,EAX
                pop     RBP
                ret
                add     [RAX],AL

--


More information about the Digitalmars-d-bugs mailing list